(function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$(''); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); !function(e,t,n){function r(e,t){return typeof e===t}function i(){var e,t,n,i,s,o,a;for(var d in x)if(x.hasOwnProperty(d)){if(e=[],t=x[d],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nc;c++)if(h=e[c],g=q.style[h],l(h,"-")&&(h=a(h)),q.style[h]!==n){if(s||r(i,"undefined"))return d(),"pfx"==t?h:!0;try{q.style[h]=i}catch(v){}if(q.style[h]!=g)return d(),"pfx"==t?h:!0}return d(),!1}function A(e,t,n,i,s){var o=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+P.join(o+" ")+o).split(" ");return r(t,"string")||r(t,"undefined")?g(a,t,i,s):(a=(e+" "+R.join(o+" ")+o).split(" "),p(a,t,n))}function v(e,t,r){return A(e,n,n,t,r)}var y=[],x=[],w={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=w,Modernizr=new Modernizr,Modernizr.addTest("eventlistener","addEventListener"in e),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?e.history&&"pushState"in e.history:!1}),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var T=t.documentElement,b="svg"===T.nodeName.toLowerCase();Modernizr.addTest("canvas",function(){var e=o("canvas");return!(!e.getContext||!e.getContext("2d"))}),Modernizr.addTest("multiplebgs",function(){var e=o("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("csspointerevents",function(){var e=o("a").style;return e.cssText="pointer-events:auto","auto"===e.pointerEvents}),Modernizr.addTest("time","valueAsDate"in o("time")),Modernizr.addTest("placeholder","placeholder"in o("input")&&"placeholder"in o("textarea"));var C=function(){function e(e,t){var i;return e?(t&&"string"!=typeof t||(t=o(t||"div")),e="on"+e,i=e in t,!i&&r&&(t.setAttribute||(t=o("div")),t.setAttribute(e,""),i="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),i):!1}var r=!("onblur"in t.documentElement);return e}();w.hasEvent=C,Modernizr.addTest("hashchange",function(){return C("hashchange",e)===!1?!1:t.documentMode===n||t.documentMode>7});var S=w._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];w._prefixes=S,Modernizr.addTest("csscalc",function(){var e="width:",t="calc(10px);",n=o("a");return n.style.cssText=e+S.join(t+e),!!n.style.length}),Modernizr.addTest("cssgradients",function(){for(var e,t="background-image:",n="gradient(linear,left top,right bottom,from(#9f9),to(white));",r="",i=0,s=S.length-1;s>i;i++)e=0===i?"to ":"",r+=t+S[i]+"linear-gradient("+e+"left top, #9f9, white);";Modernizr._config.usePrefixes&&(r+=t+"-webkit-"+n);var a=o("a"),d=a.style;return d.cssText=r,(""+d.backgroundImage).indexOf("gradient")>-1}),Modernizr.addTest("csspositionsticky",function(){var e="position:",t="sticky",n=o("a"),r=n.style;return r.cssText=e+S.join(t+";"+e).slice(0,-e.length),-1!==r.position.indexOf(t)});var _="CSS"in e&&"supports"in e.CSS,E="supportsCSS"in e;Modernizr.addTest("supports",_||E);var z;!function(){var e={}.hasOwnProperty;z=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),w._l={},w.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},w._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e=9,i=533>t&&e.match(/android/gi);return n||i||r}();k?Modernizr.addTest("fontface",!1):j('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),i=r.sheet||r.styleSheet,s=i?i.cssRules&&i.cssRules[0]?i.cssRules[0].cssText:i.cssText||"":"",o=/src/i.test(s)&&0===s.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",o)}),j("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}",function(e){Modernizr.addTest("lastchild",e.lastChild.offsetWidth>e.firstChild.offsetWidth)},2),j("#modernizr div {width:1px} #modernizr div:nth-child(2n){width:2px;}",function(e){for(var t=e.getElementsByTagName("div"),n=!0,r=0;5>r;r++)n=n&&t[r].offsetWidth===r%2+1;Modernizr.addTest("nthchild",n)},5),j("#modernizr { height: 50vh; }",function(t){var n=parseInt(e.innerHeight/2,10),r=parseInt((e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).height,10);Modernizr.addTest("cssvhunit",r==n)});var B=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return f("@media "+t+" { #modernizr { position: absolute; }}",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();w.mq=B,Modernizr.addTest("mediaqueries",B("only all"));var O="Moz O ms Webkit",P=w._config.usePrefixes?O.split(" "):[];w._cssomPrefixes=P;var N=function(t){var r,i=S.length,s=e.CSSRule;if("undefined"==typeof s)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in s)return"@"+t;for(var o=0;i>o;o++){var a=S[o],d=a.toUpperCase()+"_"+r;if(d in s)return"@-"+a.toLowerCase()+"-"+t}return!1};w.atRule=N;var R=w._config.usePrefixes?O.toLowerCase().split(" "):[];w._domPrefixes=R;var M={elem:o("modernizr")};Modernizr._q.push(function(){delete M.elem});var q={style:M.elem.style};Modernizr._q.unshift(function(){delete q.style}),w.testAllProps=A;var I=w.prefixed=function(e,t,n){return 0===e.indexOf("@")?N(e):(-1!=e.indexOf("-")&&(e=a(e)),t?A(e,t,n):A(e,"pfx"))};Modernizr.addTest("requestanimationframe",!!I("requestAnimationFrame",e),{aliases:["raf"]}),Modernizr.addTest("objectfit",!!I("objectFit"),{aliases:["object-fit"]}),w.testAllProps=v,Modernizr.addTest("ellipsis",v("textOverflow","ellipsis")),Modernizr.addTest("cssfilters",function(){if(Modernizr.supports)return v("filter","blur(2px)");var e=o("a");return e.style.cssText=S.join("filter:blur(2px); "),!!e.style.length&&(t.documentMode===n||t.documentMode>9)}),Modernizr.addTest("flexbox",v("flexBasis","1px",!0)),Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&v("transform","scale(1)",!0)}),Modernizr.addTest("csstransforms3d",function(){var e=!!v("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in T.style)){var n,r="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",j(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),Modernizr.addTest("csstransitions",v("transition","all",!0)),Modernizr.addTest("cssanimations",v("animationName","a",!0)),i(),s(y),delete w.addTest,delete w.addAsyncTest;for(var U=0;U .row").addClass("row-slider-slide")):1 .spb_content_element > .row").length&&(a=e.find("> .spb_content_element"),e.find("> .spb_content_element > .row").addClass("row-slider-slide"));var t=e.find(".spb-row-slider-atts");a.flickity({cellAlign:"left",contain:!0,cellSelector:".row-slider-slide",wrapAround:t.data("loop"),freeScroll:t.data("freescroll"),draggable:t.data("draggable"),initialIndex:t.data("initial-index"),setGallerySize:!0,autoPlay:parseInt(t.data("autoplay"),10),pageDots:t.data("dots"),prevNextButtons:t.data("arrows"),rightToLeft:SPB.var.isRTL})},fullWidthRow:function(e,a,t){var i,n,s,r;a?(n=(i=e.parent(".fw-row")).next(".spb-row-sizer")?i.next(".spb-row-sizer"):i.parent().find(".spb-row-sizer"),r=e.children(".spb_content_element"),n.offset()&&(s=n.offset().left)):(n=(i=e).next(".spb-fw-sizer")?i.next(".spb-fw-sizer"):i.parent().find(".spb-fw-sizer")).offset()&&(s=n.offset().left),i.addClass("spb-hidden");var A=parseInt(i.css("margin-left"),10),o=parseInt(i.css("margin-right"),10),l=Math.floor(0-s-A),d=Math.floor(SPB.var.window.width());if(SPB.var.body.hasClass("layout-boxed")?(d=Math.ceil(jQuery("#container").width()),l+=jQuery("#container").offset().left):SPB.var.body.hasClass("vertical-header")?(d=Math.ceil(jQuery("#main-container").width()),l+=jQuery("#main-container").offset().left):(SPB.var.body.hasClass("hero-content-split")||SPB.var.body.hasClass("boxed-inner-page"))&&(d=Math.ceil(jQuery(".inner-page-wrap").parent().outerWidth()),l+=jQuery(".inner-page-wrap").parent().offset().left),SPB.var.body.css("padding-left")){var c=parseInt(SPB.var.body.css("padding-left"),10);d-=c,l+=c}SPB.var.body.css("padding-right")&&(d-=parseInt(SPB.var.body.css("padding-right"),10));if(i.css({position:"relative",left:SPB.var.body.hasClass("rtl")?-l:l,width:d}),i.addClass("fw-row-adjusted"),!t&&r){var u=-1*l;u<0&&(u=0);var h=d-u-n.width()+A+o;h<0&&(h=0),r.css({"padding-left":u+"px","padding-right":h+"px"})}e.attr("data-sb-init","true"),e.css("opacity",1).css("visibility","visible"),i.removeClass("spb-hidden")},resizeVideoRow:function(e){if(0!==e.find("video").length){var a=e.find("video"),t=e.outerHeight(),i=e.outerWidth(),n=a[0].videoWidth,s=a[0].videoHeight,r=i/n,A=t/s,o=A .row").addClass("col-slider-slide"),e.find(".spb-column-inner").flickity({cellAlign:"left",contain:!0,cellSelector:".col-slider-slide",wrapAround:a.data("loop"),freeScroll:a.data("freescroll"),draggable:a.data("draggable"),initialIndex:a.data("initial-index"),setGallerySize:!0,autoPlay:parseInt(a.data("autoplay"),10),pageDots:a.data("dots"),prevNextButtons:a.data("arrows"),rightToLeft:SPB.var.isRTL})},columnEqualHeightsRow:function(e){768<=SPB.var.window.width()?(e.find("> .spb_content_element .spb-column-container").css("min-height",""),e.find("> .spb_content_element .spb-column-container").parent().equalHeights()):e.find("> .spb_content_element .spb-column-container").css("min-height","")},columnContentPositionRow:function(e){var s=e.data("col-content-pos");void 0!==s&&"top"!==s&&(e.addClass("spb-hidden"),0 .row,.spb-row-multi-col > .row").each(function(){var e=jQuery(this),n=0;1 div").length&&(e.addClass("multi-column-row"),e.find("> div").each(function(){var e=parseInt(jQuery(this).css("padding-top"))+parseInt(jQuery(this).css("padding-bottom")),a=jQuery(this).find(".spb-asset-content").first().innerHeight()+e;n div").css("min-height",n),e.find("> div").each(function(){jQuery(this).addClass("spb-hidden");var e=jQuery(this).find(".spb-asset-content").first(),a=parseInt(jQuery(this).css("padding-top"))+parseInt(jQuery(this).css("padding-bottom"))+parseInt(e.css("padding-top"))+parseInt(e.css("padding-bottom")),t=e.height()+a,i=Math.floor(n/2-t/2);0 img").prop("src");e&&jQuery(this).find(".img-wrap").css("backgroundImage","url("+e+")").addClass("compat-object-fit")}})}},SPB.animatedHeadline={init:function(){var e=jQuery(".spb-animated-headline");e.each(function(){var e=jQuery(this).find(".sf-headline");setTimeout(function(){SPB.animatedHeadline.animateHeadline(e)},2500)}),SPB.animatedHeadline.singleLetters(jQuery(".sf-headline.letters").find("b"))},singleLetters:function(e){e.each(function(){for(var e=jQuery(this),a=e.text().split(""),t=e.hasClass("is-visible"),i=0;i"+a[i]+""),a[i]=t?''+a[i]+"":""+a[i]+"";var n=a.join("");e.html(n).css("opacity",1)})},animateHeadline:function(e){var s=2500;e.each(function(){var e=jQuery(this);if(e.hasClass("loading-bar")){s=3800;setTimeout(function(){e.find(".sf-words-wrapper").addClass("is-loading")},800)}else if(e.hasClass("clip")){var a=e.find(".sf-words-wrapper"),t=a.width()+10;a.css("width",t)}else if(!e.hasClass("type")){var i=e.find(".sf-words-wrapper b"),n=0;i.each(function(){var e=jQuery(this).width()+10;n=a.children("i").length;SPB.animatedHeadline.hideLetter(e.find("i").eq(0),e,i,50),SPB.animatedHeadline.showLetter(a.find("i").eq(0),a,i,50)}else e.parents(".sf-headline").hasClass("clip")?e.parents(".sf-words-wrapper").animate({width:"2px"},600,function(){SPB.animatedHeadline.switchWord(e,a),SPB.animatedHeadline.showWord(a)}):e.parents(".sf-headline").hasClass("loading-bar")?(e.parents(".sf-words-wrapper").removeClass("is-loading"),SPB.animatedHeadline.switchWord(e,a),setTimeout(function(){SPB.animatedHeadline.hideWord(a)},3800),setTimeout(function(){e.parents(".sf-words-wrapper").addClass("is-loading")},800)):(SPB.animatedHeadline.switchWord(e,a),setTimeout(function(){SPB.animatedHeadline.hideWord(a)},2500))},showWord:function(e,a){e.parents(".sf-headline").hasClass("type")?(SPB.animatedHeadline.showLetter(e.find("i").eq(0),e,!1,a),e.addClass("is-visible").removeClass("is-hidden")):e.parents(".sf-headline").hasClass("clip")&&e.parents(".sf-words-wrapper").animate({width:e.width()+10},600,function(){setTimeout(function(){SPB.animatedHeadline.hideWord(e)},1500)})},hideLetter:function(e,a,t,i){if(e.removeClass("in").addClass("out"),e.is(":last-child")?t&&setTimeout(function(){SPB.animatedHeadline.hideWord(SPB.animatedHeadline.takeNext(a))},2500):setTimeout(function(){SPB.animatedHeadline.hideLetter(e.next(),a,t,i)},i),e.is(":last-child")&&jQuery("html").hasClass("no-csstransitions")){var n=SPB.animatedHeadline.takeNext(a);SPB.animatedHeadline.switchWord(a,n)}},showLetter:function(e,a,t,i){e.addClass("in").removeClass("out"),e.is(":last-child")?(a.parents(".sf-headline").hasClass("type")&&setTimeout(function(){a.parents(".sf-words-wrapper").addClass("waiting")},200),t||setTimeout(function(){SPB.animatedHeadline.hideWord(a)},2500)):setTimeout(function(){SPB.animatedHeadline.showLetter(e.next(),a,t,i)},i)},takeNext:function(e){return e.is(":last-child")?e.parent().children().eq(0):e.next()},takePrev:function(e){return e.is(":first-child")?e.parent().children().last():e.prev()},switchWord:function(e,a){e.removeClass("is-visible").addClass("is-hidden"),a.removeClass("is-hidden").addClass("is-visible")}},SPB.directoryUserListings={init:function(){jQuery(document).on("click",".cancel-listing-modal",function(){return jQuery(".spb-modal-listing").html(""),jQuery(".spb-modal-listing ").hide(),jQuery("#spb_edit_listing").hide(),!1}),jQuery(document).on("click",".save-listing-modal",function(){jQuery("#add-directory-entry").submit()}),jQuery("body").append('
    '),jQuery(document).on("click",".edit-listing",function(){var e=jQuery(".user-listing-results").attr("data-ajax-url"),a={action:"sf_edit_directory_item",listing_id:jQuery(this).attr("data-listing-id")};return jQuery.post(e,a,function(e){jQuery("#spb_edit_listing").show().css({"padding-top":60}),jQuery(".spb-modal-listing").html(e),jQuery(".spb-modal-listing").show(),jQuery("#spb_edit_listing").html("")}),!1}),jQuery(document).on("click",".delete-listing-confirmation",function(e){e.preventDefault();var a=jQuery(".user-listing-results").attr("data-ajax-url"),t={action:"sf_delete_directory_item",listing_id:jQuery("#modal-from-dom").attr("listing-id")};jQuery.post(a,t,function(){location.reload()})}),jQuery(document).on("click",".cancel-delete-listing",function(e){e.preventDefault(),jQuery("#modal-from-dom").modal("hide")}),jQuery(document).on("click",".delete-listing",function(e){e.preventDefault();var a=jQuery(this).attr("data-listing-id");jQuery("#modal-from-dom").attr("listing-id",a),jQuery("#modal-from-dom").data("id",a).modal("show")})}},SPB.dynamicHeader={init:function(){SPB.var.body.hasClass("sticky-header-transparent")&&SPB.var.window.scroll(function(){var e=jQuery(".dynamic-header-change:in-viewport"),n=SPB.var.window.scrollTop();0'),jQuery(".sf-team-ajax-container").html(a),setTimeout(function(){jQuery(".sf-container-overlay").addClass("loading-done"),SPB.var.body.addClass("sf-team-ajax-open"),jQuery(".sf-container-overlay").on("click touchstart",SPB.teamMemberAjax.closeOverlay)},300)})}),jQuery(document).on("click",".team-ajax-close",function(e){e.preventDefault(),SPB.teamMemberAjax.closeOverlay()})},closeOverlay:function(){SPB.var.body.removeClass("sf-team-ajax-open"),jQuery(".sf-container-overlay").off("click touchstart").animate({opacity:0},500,function(){SPB.var.body.removeClass("sf-container-block"),SPB.var.body.removeClass("sf-team-ajax-will-open"),jQuery(".sf-team-ajax-container").remove(),jQuery(".sf-container-overlay").removeClass("loading-done")})}},SPB.tourElements={init:function(){jQuery(".spb_tour").each(function(){var a=jQuery(this),e=parseInt(a.data("interval"),0);if(console.log(e),0 a").trigger("click"):e.next().find("a").trigger("click")},e);a.data("interval",t),a.on("click",".tabs-left li > a",function(e){return void 0!==e.originalEvent&&clearInterval(t),e})}})}},SPB.var={},SPB.var.window=jQuery(window),SPB.var.body=jQuery("body"),SPB.var.isRTL=!!SPB.var.body.hasClass("rtl"),SPB.var.deviceAgent=navigator.userAgent.toLowerCase(),SPB.var.isMobile=SPB.var.deviceAgent.match(/(iphone|ipod|ipad|android|iemobile)/),SPB.var.isIEMobile=SPB.var.deviceAgent.match(/(iemobile)/),SPB.var.isSafari=-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome")&&-1==navigator.userAgent.indexOf("Android"),SPB.var.isFirefox=-1s.threshold&&r||a)&&(e.type="throttledresize",o.dispatch.apply(t,i),r=!1,d=0),9');i("body").prepend(t),a=!0,t[0].play(),t[0].onplay=function(){this.playing=!0},t[0].oncanplay=function(){t[0].playing?e(!0):e(!1),t[0].pause(),t.remove()}}catch(e){}a||e(!1)}})}(jQuery),function(a){a.fn.vCenter=function(){return this.each(function(){var e=a(this).outerHeight();a(this).css("margin-bottom",-e/2)})},a.fn.vCenterTop=function(){return this.each(function(){var e=a(this).outerHeight();a(this).css("margin-top",-e/2)})}}(jQuery); var SWIFTSLIDER=SWIFTSLIDER||{};!function(){"use strict";var e=[],t=jQuery(window),i=jQuery("body"),n=navigator.userAgent.toLowerCase(),r=(n.match(/(iphone|ipod|android|iemobile)/),n.match(/(iphone|ipod|ipad|android|iemobile)/)),s=(n.match(/(iphone|ipod|ipad)/),n.indexOf("android")>-1),a=(navigator.userAgent.search("Safari")>=0&&navigator.userAgent.search("Chrome"),-1!=navigator.userAgent.indexOf("Safari")||-1==navigator.userAgent.indexOf("Chrome")),o=null,l=0;SWIFTSLIDER.curtainAnimating=!1,SWIFTSLIDER={init:function(){jQuery(".swift-slider").each(function(e){var i=jQuery(this),n=i.attr("id"),r=i.data("fullscreen"),s=parseInt(t.height(),10),a=parseInt(i.data("max-height"),10);if(i.hasClass("no-slides"))return!1;jQuery("#wpadminbar").length>0&&(s-=jQuery("#wpadminbar").height());var o=s>a||!r&&a?a:s;jQuery("#top-bar").length>0&&(o-=jQuery("#top-bar").height()),i.css("height",o),SWIFTSLIDER.setupSlider(e,n),SWIFTSLIDER.prepareFirstSlide(e,jQuery("#"+n))}),t.on("throttledresize",function(){setTimeout(function(){SWIFTSLIDER.resizeSliders()},100)})},setupSlider:function(t,i){var n="#"+i,r=jQuery(n),s=r.data("slider-type"),a=parseInt(r.data("autoplay"),10),o=r.data("transition"),l=r.data("loop"),d=!1,p=!0,c=!0;1===r.data("slide-count")&&(p=!1,c=!1,d=!0),"curtain"==s?e[t]=new Swiper(n,{loop:!1,progress:!0,mode:"vertical",transition:"slide",speed:1e3,autoplay:a,keyboardControl:!0,simulateTouch:!1,mousewheelControl:!0,mousewheelControlForceToAxis:!0,noSwiping:d,onFirstInit:SWIFTSLIDER.afterSliderCurtainInit,onSlideChangeStart:SWIFTSLIDER.slideTransitionStart,onSlideChangeEnd:SWIFTSLIDER.slideTransitionEnd,onTouchStart:function(e){for(var t=0;t0)jQuery.canVideoautoplay(function(r){if(r||s){var a=i.find(".swiper-slide-active video").first(),o=a.get(0);o.load(),o.addEventListener("loadeddata",function(){SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)}),o.onended=function(e){a.attr("loop")||i.find(".swiper-slide-active video").addClass("finished")}}else i.find(".swiper-slide-active video").remove(),SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)});else{var r=i.find(".swiper-slide-active").data("slide-img");if(r&&r.length>0){var a=new Image;jQuery(a).load(function(){SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)}),a.src=r}else SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)}},afterSliderInit:function(e){SWIFTSLIDER.resizeSliders(),t.scroll(function(){jQuery(".swift-slider").each(function(){var e=jQuery(this),t=e.find(".swiper-slide-active").find("video");t.length>0&&(e.is(":in-viewport")&&!t.hasClass("finished")?t.parents(".swiper-slide-active").length>0&&t.get(0).play():t.each(function(){jQuery(this).get(0).pause()}))})})},afterSliderCurtainInit:function(e){var i=e,n=jQuery(i.container),r=n.find(".swift-scroll-indicator");SWIFTSLIDER.resizeSliders(),setTimeout(function(){SWIFTSLIDER.scrollIndicatorAnimate(r)},1e3),t.scrollTop()<10?SWIFTSLIDER.curtainEnter(i,n):jQuery("body,html").animate({scrollTop:n.scrollTop()},200,"easeOutCubic",function(){SWIFTSLIDER.curtainEnter(i,n)}),n.on("mouseenter",function(){SWIFTSLIDER.curtainEnter(i,n)}),n.on("mouseleave",function(){})},scrollIndicatorAnimate:function(e){var t=e.find("span");if(e.hasClass("indicator-hidden"))return!1;t.each(function(i,n){(n=jQuery(n)).delay(100*i).animate({opacity:1},100,function(){n.animate({opacity:0},500,function(){i===t.length-1&&setTimeout(function(){SWIFTSLIDER.scrollIndicatorAnimate(e)},2e3)})})})},curtainEnter:function(e,i){var n=!1;"undefined"!=typeof SWIFT&&(n=SWIFT.isScrolling),t.scrollTop()>0&&!n&&jQuery("body,html").animate({scrollTop:i.scrollTop()},800,"easeOutCubic",function(){SWIFTSLIDER.curtainAnimating=!1}),i.data("continue")||(SWIFTSLIDER.curtainAnimating=!1)},sliderLoaded:function(t,n){n.find("#swift-slider-loader").fadeOut(400),n.find(".swiper-wrapper").animate({opacity:1},400),n.find(".video-overlay").animate({opacity:1},400),!(n.parent().parent("#container").length>0||n.parent().parent("body").length>0||0===n.offset().top)||i.hasClass("header-standard")||i.hasClass("layout-boxed")||"curtain"==n.data("slider-type")||r||i.hasClass("ss-parallax-disabled")||i.hasClass("post-type-archive-product")||(n.addClass("swift-slider-parallax"),o=n,SWIFTSLIDER.parallax()),n.find(".swift-slider-prev").on("click",function(n){n.preventDefault(),"rtl"==i.css("direction").toLowerCase()?e[t].swipeNext():e[t].swipePrev()}),n.find(".swift-slider-next").on("click",function(n){n.preventDefault(),"rtl"==i.css("direction").toLowerCase()?e[t].swipePrev():e[t].swipeNext()}),n.find(".swift-slider-pagination").on("click","> div",function(i){e[t].swipeTo(jQuery(this).index()),n.find(".swift-slider-pagination .dot").removeClass("active"),jQuery(this).addClass("active")}),n.find(".swift-slider-continue").on("click",function(e){e.preventDefault(),SWIFTSLIDER.curtainAdvance(n)})},curtainAdvance:function(e){if(!e.data("continue"))return!1;var t=i.hasClass("sticky-header-enabled")&&!i.hasClass("header-below-slider")&&jQuery(".header-wrap").is(":visible")?jQuery(".sticky-header").outerHeight():0;i.hasClass("mh-sticky")&&jQuery("#mobile-header").is(":visible")&&(t=jQuery("#mobile-header").outerHeight()),i.hasClass("sh-dynamic")&&!jQuery(".header-wrap").hasClass("full-header-stick")&&(t-=20),jQuery(".sticky-top-bar").length>0&&jQuery(".sticky-top-bar").is(":visible")&&(t+=jQuery(".sticky-top-bar").outerHeight());var n=e.offset().top+e.height()-t;jQuery("#wpadminbar").length>0&&(n-=jQuery("#wpadminbar").height()),jQuery("body,html").stop(!0,!1).animate({scrollTop:n},800),r||i.css("overflow","")},showControls:function(e){"curtain"!=e.data("slider-type")?(e.data("loop")&&e.find(".swift-slider-prev").fadeIn(400),e.find(".swift-slider-next").fadeIn(400),e.find(".swift-slider-pagination .dot").first().addClass("active"),e.find(".swift-slider-pagination").fadeIn(600),e.find(".swift-slider-continue").removeClass("continue-hidden")):"curtain"===e.data("slider-type")&&(e.find(".swift-slider-pagination .dot").first().addClass("active"),e.find(".swift-slider-pagination").css("margin-top",-e.find(".swift-slider-pagination").height()/2),e.find(".swift-slider-pagination").fadeIn(600),e.find(".swiper-slide").length<2&&e.find(".swift-slider-continue").removeClass("continue-hidden"))},parallax:function(){l=o.height(),t.smartresize(function(){l=o.height()}),window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},a&&window.addEventListener("scroll",function(){requestAnimationFrame(SWIFTSLIDER.parallaxScroll)},!1)},parallaxScroll:function(e){var n=t.scrollTop();t.width()>768&&(o.stop(!0,!0).transition({y:-.2*n},0),o.find(".caption-wrap").stop(!0,!0).transition({y:-.15*n,opacity:1-n/(l-150)},0),o.find(".swift-slider-pagination").stop(!0,!0).transition({opacity:1-n/(l-150)},0));var r=o.parent();t.height();n>=r.offset().top+r.height()-(i.hasClass("sticky-header-enabled")&&!i.hasClass("header-below-slider")&&jQuery(".header-wrap").is(":visible")?jQuery(".sticky-header").outerHeight():0)?r.addClass("not-visible"):r.removeClass("not-visible")},resizeSliders:function(e){var i=parseInt(t.height(),10);if(jQuery("#wpadminbar").length>0&&(i-=jQuery("#wpadminbar").height()),e){var n=e,r=n.data("fullscreen"),s=parseInt(n.data("max-height"),10),a=n.find(".video-wrap"),o=i>s&&!r?s:i,l=n.width();SWIFTSLIDER.setSliderSize(n,r,l,o),a.length>0&&SWIFTSLIDER.setSlideVideoSize(a,l,o)}else jQuery(".swift-slider").each(function(){var e=jQuery(this),t=e.data("fullscreen"),n=parseInt(e.data("max-height"),10),r=e.find(".video-wrap"),s=i>n&&!t?n:i,a=e.width();SWIFTSLIDER.setSliderSize(e,t,a,s),r.length>0&&SWIFTSLIDER.setSlideVideoSize(r,a,s)})},setSliderSize:function(e,t,n,r){i.hasClass("vertical-header")||i.hasClass("header-naked-light")||i.hasClass("header-naked-dark")||i.hasClass("header-below-slider")||i.hasClass("header-standard-overlay")||!t||!jQuery(".header-wrap").is(":visible")||(r-=jQuery(".header-wrap").height()),i.hasClass("vertical-header")&&jQuery("#wpadminbar").length,jQuery("#mobile-top-text").is(":visible")&&(r-=jQuery("#mobile-top-text").height()),jQuery("#mobile-header").is(":visible")&&!i.hasClass("header-below-slider")&&(r=r-jQuery("#mobile-header").height()-20),jQuery("#top-bar").length>0&&(r-=jQuery("#top-bar").height()),jQuery("#sf-header-banner").length>0&&(r-=jQuery("#sf-header-banner").height()),e.css("height",r),e.parents(".swift-slider-outer").css("height",r),e.find(".swiper-container, .swiper-slide").css("height",r),e.find(".swiper-container").css("width",n);var s=0;e.find(".caption-content").each(function(){var e=jQuery(this),t=jQuery(this).height();t>s&&(s=t),e.css("margin-top",-t/2)}),s>r&&(e.css("height",s+60),e.parents(".swift-slider-outer").css("height",s+60),e.find(".swiper-container, .swiper-slide").css("height",s+60))},setSlideVideoSize:function(e,t,i){var n=e.find(".video"),r=parseInt(n.data("width"),10),s=parseInt(n.data("height"),10);0===r&&(r=n[0].videoWidth),0===s&&(s=n[0].videoHeight),0===r&&(r=1920),0===s&&(s=1080),n.css("height",i).css("width",t),e.width(t).height(i);var a=t/r,o=i/s,l=a>o?a:o,d=r/s*(i+20);l*ro&&(s-=o):s+=1,n.find(".swift-slider-pagination .dot").removeClass("active"),jQuery.isNumeric(s)&&n.find(".swift-slider-pagination .dot:nth-child("+s+")").addClass("active"),a>1?n.find(".swift-scroll-indicator").fadeOut(300):n.find(".swift-scroll-indicator").fadeIn(300),a===o&&l?setTimeout(function(){n.find(".swift-slider-continue").removeClass("continue-hidden")},600):setTimeout(function(){},300),n.find(".swift-slider-pagination, .swift-slider-prev, .swift-slider-next, .swift-slider-continue").removeClass("dark").removeClass("light").addClass(r.data("style")),1!==s||n.data("loop")?s!==n.find(".swiper-slide").length||n.data("loop")?(n.find(".swift-slider-prev").css("display","block"),n.find(".swift-slider-next").css("display","block")):(n.find(".swift-slider-prev").css("display","block"),n.find(".swift-slider-next").css("display","none")):(n.find(".swift-slider-prev").css("display","none"),n.find(".swift-slider-next").css("display","block"))},slideTransitionEnd:function(e,n){var r=jQuery(e.container),a=jQuery(e.activeSlide()),o=(e.activeIndex>=0&&e.activeIndex,a.data("slide-id")?parseInt(a.data("slide-id"),10):1),l=n||0,d=r.find(".swift-slider-pagination").find(".dot").length,p=jQuery(".swift-slider-prev").find("h4"),c=jQuery(".swift-slider-next").find("h4"),u=1===o?r.find('.swiper-slide[data-slide-id="'+d+'"]').data("slide-title"):r.find('.swiper-slide[data-slide-id="'+(o-1)+'"]').data("slide-title"),A=o===d?r.find('.swiper-slide[data-slide-id="1"]').data("slide-title"):r.find('.swiper-slide[data-slide-id="'+(o+1)+'"]').data("slide-title");SWIFTSLIDER.resizeSliders(r),p.text(u),c.text(A),r.find(".swiper-slide").each(function(e){var n=jQuery(this),a=n.data("slide-id"),d=n.find(".caption-content"),p=n.find(".video-wrap > video").first(),c=n.data("header-style"),u=!1;p.length>0&&(u=!0),u&&jQuery.canVideoautoplay(function(e){e||s||(p.remove(),u=!1)}),u&&(p.get(0).pause(),0!==p.get(0).currentTime&&(p.get(0).currentTime=0)),a!==o&&d.length>0&&d.css({"margin-top":"","padding-top":"","padding-bottom":"",opacity:"0"}).removeClass("caption-active"),a===o&&(r.is(":in-viewport")&&(i.hasClass("header-naked-light")||i.hasClass("header-naked-dark"))&&t.scrollTop()<1&&jQuery(".header-wrap").attr("data-style",c),setTimeout(function(){if(u&&(r.is(":in-viewport")&&!p.hasClass("finished")?p.parents(".swiper-slide-active").length>0&&p.get(0).play():p.get(0).pause()),d.length>0){var e=d.height();d.addClass("caption-active"),d.css("margin-top",-e/2).stop().animate({opacity:1,"padding-top":0,"padding-bottom":0},800,"easeOutQuart")}},l))})},setSliderContent:function(e){e.find(".swiper-slide").each(function(){var e=jQuery(this).find(".caption-content"),t=e.height();e.css("margin-top",-t/2)})}};var d=function(){jQuery(".swift-slider").length>0&&SWIFTSLIDER.init()};jQuery(document).ready(d)}(jQuery);var Swiper=function(e,t){"use strict";if(!document.body.outerHTML&&document.body.__defineGetter__&&HTMLElement){var i=HTMLElement.prototype;i.__defineGetter__&&i.__defineGetter__("outerHTML",function(){return(new XMLSerializer).serializeToString(this)})}if(window.getComputedStyle||(window.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var i=/(\-([a-z]){1})/g;return"float"===t&&(t="styleFloat"),i.test(t)&&(t=t.replace(i,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var i=t||0,n=this.length;i=0;var p={eventTarget:"wrapper",mode:"horizontal",touchRatio:1,speed:300,freeMode:!1,freeModeFluid:!1,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,slidesPerViewFit:!0,simulateTouch:!0,followFinger:!0,shortSwipes:!0,longSwipesRatio:.5,moveStartThreshold:!1,onlyExternal:!1,createPagination:!0,pagination:!1,paginationElement:"span",paginationClickable:!1,paginationAsRange:!0,resistance:!0,scrollContainer:!1,preventLinks:!0,preventLinksPropagation:!1,noSwiping:!1,noSwipingClass:"swiper-no-swiping",initialSlide:0,keyboardControl:!1,mousewheelControl:!1,mousewheelControlForceToAxis:!1,useCSS3Transforms:!0,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,loop:!1,loopAdditionalSlides:0,roundLengths:!1,calculateHeight:!1,cssWidthAndHeight:!1,updateOnImagesReady:!0,releaseFormElements:!0,watchActiveIndex:!1,visibilityFullFit:!1,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:!1,queueStartCallbacks:!1,queueEndCallbacks:!1,autoResize:!0,resizeReInit:!1,DOMAnimation:!0,loader:{slides:[],slidesHTMLType:"inner",surroundGroups:1,logic:"reload",loadAllSlides:!1},swipeToPrev:!0,swipeToNext:!0,slideElement:"div",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",wrapperClass:"swiper-wrapper",paginationElementClass:"swiper-pagination-switch",paginationActiveClass:"swiper-active-switch",paginationVisibleClass:"swiper-visible-switch"};for(var c in t=t||{},p)if(c in t&&"object"==typeof t[c])for(var u in p[c])u in t[c]||(t[c][u]=p[c][u]);else c in t||(t[c]=p[c]);d.params=t,t.scrollContainer&&(t.freeMode=!0,t.freeModeFluid=!0),t.loop&&(t.resistance="100%");var A="horizontal"===t.mode,h=["mousedown","mousemove","mouseup"];d.browser.ie10&&(h=["MSPointerDown","MSPointerMove","MSPointerUp"]),d.browser.ie11&&(h=["pointerdown","pointermove","pointerup"]),d.touchEvents={touchStart:d.support.touch||!t.simulateTouch?"touchstart":h[0],touchMove:d.support.touch||!t.simulateTouch?"touchmove":h[1],touchEnd:d.support.touch||!t.simulateTouch?"touchend":h[2]};for(var f=d.container.childNodes.length-1;f>=0;f--)if(d.container.childNodes[f].className)for(var g=d.container.childNodes[f].className.split(/\s+/),w=0;w=0;i--)e===d.slides[i]&&(t=i);return t},e.isActive=function(){return e.index()===d.activeIndex},e.swiperSlideDataStorage||(e.swiperSlideDataStorage={}),e.getData=function(t){return e.swiperSlideDataStorage[t]},e.setData=function(t,i){return e.swiperSlideDataStorage[t]=i,e},e.data=function(t,i){return void 0===i?e.getAttribute("data-"+t):(e.setAttribute("data-"+t,i),e)},e.getWidth=function(t,i){return d.h.getWidth(e,t,i)},e.getHeight=function(t,i){return d.h.getHeight(e,t,i)},e.getOffset=function(){return d.h.getOffset(e)},e},d.calcSlides=function(e){var i=!!d.slides&&d.slides.length;d.slides=[],d.displaySlides=[];for(var n=0;n=0;n--)d._extendSwiperSlide(d.slides[n]);!1!==i&&(i!==d.slides.length||e)&&(R(),F(),d.updateActiveSlide(),d.params.pagination&&d.createPagination(),d.callPlugins("numberOfSlidesChanged"))},d.createSlide=function(e,i,n){i=i||d.params.slideClass,n=n||t.slideElement;var r=document.createElement(n);return r.innerHTML=e||"",r.className=i,d._extendSwiperSlide(r)},d.appendSlide=function(e,t,i){if(e)return e.nodeType?d._extendSwiperSlide(e).append():d.createSlide(e,t,i).append()},d.prependSlide=function(e,t,i){if(e)return e.nodeType?d._extendSwiperSlide(e).prepend():d.createSlide(e,t,i).prepend()},d.insertSlideAfter=function(e,t,i,n){return void 0!==e&&(t.nodeType?d._extendSwiperSlide(t).insertAfter(e):d.createSlide(t,i,n).insertAfter(e))},d.removeSlide=function(e){if(d.slides[e]){if(t.loop){if(!d.slides[e+d.loopedSlides])return!1;d.slides[e+d.loopedSlides].remove(),d.removeLoopedSlides(),d.calcSlides(),d.createLoop()}else d.slides[e].remove();return!0}return!1},d.removeLastSlide=function(){return d.slides.length>0&&(t.loop?(d.slides[d.slides.length-1-d.loopedSlides].remove(),d.removeLoopedSlides(),d.calcSlides(),d.createLoop()):d.slides[d.slides.length-1].remove(),!0)},d.removeAllSlides=function(){for(var e=d.slides.length,t=d.slides.length-1;t>=0;t--)d.slides[t].remove(),t===e-1&&d.setWrapperTranslate(0)},d.getSlide=function(e){return d.slides[e]},d.getLastSlide=function(){return d.slides[d.slides.length-1]},d.getFirstSlide=function(){return d.slides[0]},d.activeSlide=function(){return d.slides[d.activeIndex]},d.fireCallback=function(){var e=arguments[0];if("[object Array]"===Object.prototype.toString.call(e))for(var i=0;i0&&(w.style.paddingLeft="",w.style.paddingRight="",w.style.paddingTop="",w.style.paddingBottom=""),w.style.width="",w.style.height="",t.offsetPxBefore>0&&(A?d.wrapperLeft=t.offsetPxBefore:d.wrapperTop=t.offsetPxBefore),t.offsetPxAfter>0&&(A?d.wrapperRight=t.offsetPxAfter:d.wrapperBottom=t.offsetPxAfter),t.centeredSlides&&(A?(d.wrapperLeft=(l-this.slides[0].getWidth(!0,t.roundLengths))/2,d.wrapperRight=(l-d.slides[d.slides.length-1].getWidth(!0,t.roundLengths))/2):(d.wrapperTop=(l-d.slides[0].getHeight(!0,t.roundLengths))/2,d.wrapperBottom=(l-d.slides[d.slides.length-1].getHeight(!0,t.roundLengths))/2)),A?(d.wrapperLeft>=0&&(w.style.paddingLeft=d.wrapperLeft+"px"),d.wrapperRight>=0&&(w.style.paddingRight=d.wrapperRight+"px")):(d.wrapperTop>=0&&(w.style.paddingTop=d.wrapperTop+"px"),d.wrapperBottom>=0&&(w.style.paddingBottom=d.wrapperBottom+"px")),f=0;var S=0;for(d.snapGrid=[],d.slidesGrid=[],c=0,g=0;gl){if(t.slidesPerViewFit)d.snapGrid.push(f+d.wrapperLeft),d.snapGrid.push(f+y-l+d.wrapperLeft);else for(var x=0;x<=Math.floor(y/(l+d.wrapperLeft));x++)0===x?d.snapGrid.push(f+d.wrapperLeft):d.snapGrid.push(f+d.wrapperLeft+l*x);d.slidesGrid.push(f+d.wrapperLeft)}else d.snapGrid.push(S),d.slidesGrid.push(S);S+=y/2+b/2}else{if(y>l)if(t.slidesPerViewFit)d.snapGrid.push(f),d.snapGrid.push(f+y-l);else if(0!==l)for(var E=0;E<=Math.floor(y/l);E++)d.snapGrid.push(f+l*E);else d.snapGrid.push(f);else d.snapGrid.push(f);d.slidesGrid.push(f)}f+=y,v+=o,m+=p}t.calculateHeight&&(d.height=c),A?(s=v+d.wrapperRight+d.wrapperLeft,t.cssWidthAndHeight&&"height"!==t.cssWidthAndHeight||(w.style.width=v+"px"),t.cssWidthAndHeight&&"width"!==t.cssWidthAndHeight||(w.style.height=d.height+"px")):(t.cssWidthAndHeight&&"height"!==t.cssWidthAndHeight||(w.style.width=d.width+"px"),t.cssWidthAndHeight&&"width"!==t.cssWidthAndHeight||(w.style.height=m+"px"),s=m+d.wrapperTop+d.wrapperBottom)}else if(t.scrollContainer)w.style.width="",w.style.height="",u=d.slides[0].getWidth(!0,t.roundLengths),h=d.slides[0].getHeight(!0,t.roundLengths),s=A?u:h,w.style.width=u+"px",w.style.height=h+"px",r=A?u:h;else{if(t.calculateHeight){for(c=0,h=0,A||(d.container.style.height=""),w.style.height="",g=0;g0&&(A?d.wrapperLeft=r*t.offsetSlidesBefore:d.wrapperTop=r*t.offsetSlidesBefore),t.offsetSlidesAfter>0&&(A?d.wrapperRight=r*t.offsetSlidesAfter:d.wrapperBottom=r*t.offsetSlidesAfter),t.offsetPxBefore>0&&(A?d.wrapperLeft=t.offsetPxBefore:d.wrapperTop=t.offsetPxBefore),t.offsetPxAfter>0&&(A?d.wrapperRight=t.offsetPxAfter:d.wrapperBottom=t.offsetPxAfter),t.centeredSlides&&(A?(d.wrapperLeft=(l-r)/2,d.wrapperRight=(l-r)/2):(d.wrapperTop=(l-r)/2,d.wrapperBottom=(l-r)/2)),A?(d.wrapperLeft>0&&(w.style.paddingLeft=d.wrapperLeft+"px"),d.wrapperRight>0&&(w.style.paddingRight=d.wrapperRight+"px")):(d.wrapperTop>0&&(w.style.paddingTop=d.wrapperTop+"px"),d.wrapperBottom>0&&(w.style.paddingBottom=d.wrapperBottom+"px")),s=A?u+d.wrapperRight+d.wrapperLeft:h+d.wrapperTop+d.wrapperBottom,parseFloat(u)>0&&(!t.cssWidthAndHeight||"height"===t.cssWidthAndHeight)&&(w.style.width=u+"px"),parseFloat(h)>0&&(!t.cssWidthAndHeight||"width"===t.cssWidthAndHeight)&&(w.style.height=h+"px"),f=0,d.snapGrid=[],d.slidesGrid=[],g=0;g0&&(!t.cssWidthAndHeight||"height"===t.cssWidthAndHeight)&&(d.slides[g].style.width=o+"px"),parseFloat(p)>0&&(!t.cssWidthAndHeight||"width"===t.cssWidthAndHeight)&&(d.slides[g].style.height=p+"px")}d.initialized?(d.callPlugins("onInit"),t.onInit&&d.fireCallback(t.onInit,d)):(d.callPlugins("onFirstInit"),t.onFirstInit&&d.fireCallback(t.onFirstInit,d)),d.initialized=!0}},d.reInit=function(e){d.init(!0,e)},d.resizeFix=function(e){d.callPlugins("beforeResizeFix"),setTimeout(function(){d.init(t.resizeReInit||e),t.freeMode?d.getWrapperTranslate()<-W()&&(d.setWrapperTransition(0),d.setWrapperTranslate(-W())):(d.swipeTo(t.loop?d.activeLoopIndex:d.activeIndex,0,!1),t.autoplay&&(d.support.transitions&&void 0!==E?void 0!==E&&(clearTimeout(E),E=void 0,d.startAutoplay()):void 0!==I&&(clearInterval(I),I=void 0,d.startAutoplay()))),d.callPlugins("afterResizeFix")},100)},d.destroy=function(e){var i=d.h.removeEventListener,n="wrapper"===t.eventTarget?d.wrapper:d.container;if(d.browser.ie10||d.browser.ie11?(i(n,d.touchEvents.touchStart,z),i(document,d.touchEvents.touchMove,N),i(document,d.touchEvents.touchEnd,V)):(d.support.touch&&(i(n,"touchstart",z),i(n,"touchmove",N),i(n,"touchend",V)),t.simulateTouch&&(i(n,"mousedown",z),i(document,"mousemove",N),i(document,"mouseup",V))),t.autoResize&&i(window,"resize",d.resizeFix),R(),t.paginationClickable&&X(),t.mousewheelControl&&d._wheelEvent&&i(d.container,d._wheelEvent,D),t.keyboardControl&&i(document,"keydown",P),t.autoplay&&d.stopAutoplay(),e){d.wrapper.removeAttribute("style");for(var r=0;r=d.snapGrid[a].toFixed(2)&&-nd.snapGrid[a]&&-s0&&(n=0),n!==s&&(Z(n,"prev",{runCallbacks:e}),!0)},d.swipeReset=function(e){void 0===e&&(e=!0),d.callPlugins("onSwipeReset");var i,n=d.getWrapperTranslate(),s=r*t.slidesPerGroup;W();if("auto"===t.slidesPerView){i=0;for(var a=0;a=d.snapGrid[a]&&-n0?-d.snapGrid[a+1]:-d.snapGrid[a];break}}-n>=d.snapGrid[d.snapGrid.length-1]&&(i=-d.snapGrid[d.snapGrid.length-1]),n<=-W()&&(i=-W())}else i=n<0?Math.round(n/s)*s:0,n<=-W()&&(i=-W());return t.scrollContainer&&(i=n<0?n:0),i<-W()&&(i=-W()),t.scrollContainer&&l>r&&(i=0),i!==n&&(Z(i,"reset",{runCallbacks:e}),!0)},d.swipeTo=function(e,i,n){e=parseInt(e,10),d.callPlugins("onSwipeTo",{index:e,speed:i}),t.loop&&(e+=d.loopedSlides);var s,a=d.getWrapperTranslate();if(!(e>d.slides.length-1||e<0))return(s="auto"===t.slidesPerView?-d.slidesGrid[e]:-e*r)<-W()&&(s=-W()),s!==a&&(void 0===n&&(n=!0),Z(s,"to",{index:e,speed:i,runCallbacks:n}),!0)},d._queueStartCallbacks=!1,d._queueEndCallbacks=!1,d.updateActiveSlide=function(e){if(d.initialized&&0!==d.slides.length){var i;if(d.previousIndex=d.activeIndex,void 0===e&&(e=d.getWrapperTranslate()),e>0&&(e=0),"auto"===t.slidesPerView){if(d.activeIndex=d.slidesGrid.indexOf(-e),d.activeIndex<0){for(i=0;id.slidesGrid[i]&&-e=0?a.classList.add(t.slideVisibleClass):a.classList.remove(t.slideVisibleClass);d.slides[d.activeIndex].classList.add(t.slideActiveClass)}else{var o=new RegExp("\\s*"+t.slideActiveClass),l=new RegExp("\\s*"+t.slideVisibleClass);for(i=0;i=0&&(d.slides[i].className+=" "+t.slideVisibleClass);d.slides[d.activeIndex].className+=" "+t.slideActiveClass}if(t.loop){var p=d.loopedSlides;d.activeLoopIndex=d.activeIndex-p,d.activeLoopIndex>=d.slides.length-2*p&&(d.activeLoopIndex=d.slides.length-2*p-d.activeLoopIndex),d.activeLoopIndex<0&&(d.activeLoopIndex=d.slides.length-2*p+d.activeLoopIndex),d.activeLoopIndex<0&&(d.activeLoopIndex=0)}else d.activeLoopIndex=d.activeIndex;t.pagination&&d.updatePagination(e)}}},d.createPagination=function(e){if(t.paginationClickable&&d.paginationButtons&&X(),d.paginationContainer=t.pagination.nodeType?t.pagination:k(t.pagination)[0],t.createPagination){var i="",n=d.slides.length;t.loop&&(n-=2*d.loopedSlides);for(var r=0;r";d.paginationContainer.innerHTML=i}d.paginationButtons=k("."+t.paginationElementClass,d.paginationContainer),e||d.updatePagination(),d.callPlugins("onCreatePagination"),t.paginationClickable&&function(){var e=d.paginationButtons;if(e)for(var t=0;t=d.slides.length-2*d.loopedSlides&&(o=d.slides.length-2*d.loopedSlides-o,o=Math.abs(o)),a.push(o)}for(s=0;s0&&(e+=d.wrapperLeft),!A&&d.wrapperTop>0&&(e+=d.wrapperTop);for(var o=0;o=-e&&a<=-e+l&&(p=!0),n<=-e&&a>=-e+l&&(p=!0)):(a>-e&&a<=-e+l&&(p=!0),n>=-e&&n<-e+l&&(p=!0),n<-e&&a>-e+l&&(p=!0)),p&&i.push(d.slides[o])}0===i.length&&(i=[d.slides[d.activeIndex]]),d.visibleSlides=i},d.startAutoplay=function(){var e=t.autoplay;setTimeout(function(){if(d.support.transitions){if(void 0!==E)return!1;if(!t.autoplay)return;d.callPlugins("onAutoplayStart"),t.onAutoplayStart&&d.fireCallback(t.onAutoplayStart,d),q()}else{if(void 0!==I)return!1;if(!t.autoplay)return;d.callPlugins("onAutoplayStart"),t.onAutoplayStart&&d.fireCallback(t.onAutoplayStart,d),I=setInterval(function(){t.loop?(d.fixLoop(),d.swipeNext(!0,!0)):d.swipeNext(!0,!0)||(t.autoplayStopOnLast?(clearInterval(I),I=void 0):d.swipeTo(0))},e)}},2e3)},d.stopAutoplay=function(e){if(d.support.transitions){if(!E)return;E&&clearTimeout(E),E=void 0,e&&!t.autoplayDisableOnInteraction&&d.wrapperTransitionEnd(function(){q()}),d.callPlugins("onAutoplayStop"),t.onAutoplayStop&&d.fireCallback(t.onAutoplayStop,d)}else I&&clearInterval(I),I=void 0,d.callPlugins("onAutoplayStop"),t.onAutoplayStop&&d.fireCallback(t.onAutoplayStop,d)},d.loopCreated=!1,d.removeLoopedSlides=function(){if(d.loopCreated)for(var e=0;ed.slides.length&&(d.loopedSlides=d.slides.length);var e,i="",r="",s="",a=d.slides.length,o=Math.floor(d.loopedSlides/a),l=d.loopedSlides%a;for(e=0;e=a)p=e-a*Math.floor(e/a);s+=d.slides[p].outerHTML}for(e=0;e=d.slides.length-d.loopedSlides)&&d.slides[e].setData("looped",!0);d.callPlugins("onCreateLoop")}},d.fixLoop=function(){var e;d.activeIndex=2*d.loopedSlides||d.activeIndex>d.slides.length-2*t.slidesPerView)&&(e=-d.slides.length+d.activeIndex+d.loopedSlides,d.swipeTo(e,0,!1))},d.loadSlides=function(){var e="";d.activeLoaderIndex=0;for(var i=t.loader.slides,n=t.loader.loadAllSlides?i.length:t.slidesPerView*(1+t.loader.surroundGroups),r=0;r'+i[r]+"";d.wrapper.innerHTML=e,d.calcSlides(!0),t.loader.loadAllSlides||d.wrapperTransitionEnd(d.reloadSlides,!0)},d.reloadSlides=function(){var e=t.loader.slides,i=parseInt(d.activeSlide().data("swiperindex"),10);if(!(i<0||i>e.length-1)){d.activeLoaderIndex=i;var n,s=Math.max(0,i-t.slidesPerView*t.loader.surroundGroups),a=Math.min(i+t.slidesPerView*(1+t.loader.surroundGroups)-1,e.length-1);if(i>0){var o=-r*(i-s);d.setWrapperTranslate(o),d.setWrapperTransition(0)}if("reload"===t.loader.logic){d.wrapper.innerHTML="";var l="";for(n=s;n<=a;n++)l+="outer"===t.loader.slidesHTMLType?e[n]:"<"+t.slideElement+' class="'+t.slideClass+'" data-swiperindex="'+n+'">'+e[n]+"";d.wrapper.innerHTML=l}else{var p=1e3,c=0;for(n=0;na?d.wrapper.removeChild(d.slides[n]):(p=Math.min(u,p),c=Math.max(u,c))}for(n=s;n<=a;n++){var A;nc&&((A=document.createElement(t.slideElement)).className=t.slideClass,A.setAttribute("data-swiperindex",n),A.innerHTML=e[n],d.wrapper.appendChild(A))}}d.reInit(!0)}},d.calcSlides(),t.loader.slides.length>0&&0===d.slides.length&&d.loadSlides(),t.loop&&d.createLoop(),d.init(),function(){var e,i,n,r,s=d.h.addEventListener,a="wrapper"===t.eventTarget?d.wrapper:d.container;if(d.browser.ie10||d.browser.ie11?(s(a,d.touchEvents.touchStart,z),s(document,d.touchEvents.touchMove,N),s(document,d.touchEvents.touchEnd,V)):(d.support.touch&&(s(a,"touchstart",z),s(a,"touchmove",N),s(a,"touchend",V)),t.simulateTouch&&(s(a,"mousedown",z),s(document,"mousemove",N),s(document,"mouseup",V))),t.autoResize&&s(window,"resize",d.resizeFix),F(),d._wheelEvent=!1,t.mousewheelControl){if(void 0!==document.onmousewheel&&(d._wheelEvent="mousewheel"),!d._wheelEvent)try{new WheelEvent("wheel"),d._wheelEvent="wheel"}catch(e){}d._wheelEvent||(d._wheelEvent="DOMMouseScroll"),d._wheelEvent&&s(d.container,d._wheelEvent,D)}if(t.keyboardControl&&s(document,"keydown",P),t.updateOnImagesReady){d.imagesToLoad=k("img",d.container);for(var o=0;o0?d.swipeTo(t.initialSlide,0,!1):d.updateActiveSlide(0),t.autoplay&&d.startAutoplay(),d.centerIndex=d.activeIndex,t.onSwiperCreated&&d.fireCallback(t.onSwiperCreated,d),d.callPlugins("onSwiperCreated")}function k(e,t){return document.querySelectorAll?(t||document).querySelectorAll(e):jQuery(e,t)}function W(){var e=s-l;return t.freeMode&&(e=s-l),t.slidesPerView>d.slides.length&&!t.centeredSlides&&(e=0),e<0&&(e=0),e}function F(){var e,i=d.h.addEventListener;if(t.preventLinks){var n=k("a",d.container);for(e=0;e=r&&c[0]<=r+a&&c[1]>=s&&c[1]<=s+o&&(i=!0)}if(!i)return}A?(37!==t&&39!==t||(e.preventDefault?e.preventDefault():e.returnValue=!1),39===t&&d.swipeNext(),37===t&&d.swipePrev()):(38!==t&&40!==t||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===t&&d.swipeNext(),38===t&&d.swipePrev())}}function D(e){var i=d._wheelEvent,n=0;if(e.detail)n=-e.detail;else if("mousewheel"===i)if(t.mousewheelControlForceToAxis)if(A){if(!(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)))return;n=e.wheelDeltaX}else{if(!(Math.abs(e.wheelDeltaY)>Math.abs(e.wheelDeltaX)))return;n=e.wheelDeltaY}else n=e.wheelDelta;else if("DOMMouseScroll"===i)n=-e.detail;else if("wheel"===i)if(t.mousewheelControlForceToAxis)if(A){if(!(Math.abs(e.deltaX)>Math.abs(e.deltaY)))return;n=-e.deltaX}else{if(!(Math.abs(e.deltaY)>Math.abs(e.deltaX)))return;n=-e.deltaY}else n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX:-e.deltaY;if(t.freeMode){var r=d.getWrapperTranslate()+n;if(r>0&&(r=0),r<-W()&&(r=-W()),d.setWrapperTransition(0),d.setWrapperTranslate(r),d.updateActiveSlide(r),0===r||r===-W())return}else(new Date).getTime()-y>60&&(n<0?d.swipeNext():d.swipePrev()),y=(new Date).getTime();return t.autoplay&&d.stopAutoplay(!0),e.preventDefault?e.preventDefault():e.returnValue=!1,!1}function Q(e){d.allowSlideClick&&(B(e),d.fireCallback(t.onSlideClick,d,e))}function G(e){B(e),d.fireCallback(t.onSlideTouch,d,e)}function B(e){if(e.currentTarget)d.clickedSlide=e.currentTarget;else{var i=e.srcElement;do{if(i.className.indexOf(t.slideClass)>-1)break;i=i.parentNode}while(i);d.clickedSlide=i}d.clickedSlideIndex=d.slides.indexOf(d.clickedSlide),d.clickedSlideLoopIndex=d.clickedSlideIndex-(d.loopedSlides||0)}function j(e){if(!d.allowLinks)return e.preventDefault?e.preventDefault():e.returnValue=!1,t.preventLinksPropagation&&"stopPropagation"in e&&e.stopPropagation(),!1}function H(e){return e.stopPropagation?e.stopPropagation():e.returnValue=!1,!1}function z(e){if(t.preventLinks&&(d.allowLinks=!0),d.isTouched||t.onlyExternal)return!1;var i=e.target||e.srcElement;document.activeElement&&document.activeElement!==document.body&&document.activeElement!==i&&document.activeElement.blur();var n="input select textarea".split(" ");if(t.noSwiping&&i&&function(e){var i=!1;do{O(e,t.noSwipingClass)&&(i=!0),e=e.parentElement}while(!i&&e.parentElement&&!O(e,t.wrapperClass));!i&&O(e,t.wrapperClass)&&O(e,t.noSwipingClass)&&(i=!0);return i}(i))return!1;if(M=!1,d.isTouched=!0,!(L="touchstart"===e.type)&&"which"in e&&3===e.which)return d.isTouched=!1,!1;if(!L||1===e.targetTouches.length){d.callPlugins("onTouchStartBegin"),!L&&!d.isAndroid&&n.indexOf(i.tagName.toLowerCase())<0&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var r=L?e.targetTouches[0].pageX:e.pageX||e.clientX,s=L?e.targetTouches[0].pageY:e.pageY||e.clientY;d.touches.startX=d.touches.currentX=r,d.touches.startY=d.touches.currentY=s,d.touches.start=d.touches.current=A?r:s,d.setWrapperTransition(0),d.positions.start=d.positions.current=d.getWrapperTranslate(),d.setWrapperTranslate(d.positions.start),d.times.start=(new Date).getTime(),o=void 0,t.moveStartThreshold>0&&(C=!1),t.onTouchStart&&d.fireCallback(t.onTouchStart,d,e),d.callPlugins("onTouchStartEnd")}}function N(e){if(d.isTouched&&!t.onlyExternal&&(!L||"mousemove"!==e.type)){var i=L?e.targetTouches[0].pageX:e.pageX||e.clientX,n=L?e.targetTouches[0].pageY:e.pageY||e.clientY;if(void 0===o&&A&&(o=!!(o||Math.abs(n-d.touches.startY)>Math.abs(i-d.touches.startX))),void 0!==o||A||(o=!!(o||Math.abs(n-d.touches.startY)d.touches.startX)return}else if(!t.swipeToNext&&nd.touches.startY)return;if(e.assignedToSwiper)d.isTouched=!1;else if(e.assignedToSwiper=!0,t.preventLinks&&(d.allowLinks=!1),t.onSlideClick&&(d.allowSlideClick=!1),t.autoplay&&d.stopAutoplay(!0),!L||1===e.touches.length){var r;if(d.isMoved||(d.callPlugins("onTouchMoveStart"),t.loop&&(d.fixLoop(),d.positions.start=d.getWrapperTranslate()),t.onTouchMoveStart&&d.fireCallback(t.onTouchMoveStart,d)),d.isMoved=!0,e.preventDefault?e.preventDefault():e.returnValue=!1,d.touches.current=A?i:n,d.positions.current=(d.touches.current-d.touches.start)*t.touchRatio+d.positions.start,d.positions.current>0&&t.onResistanceBefore&&d.fireCallback(t.onResistanceBefore,d,d.positions.current),d.positions.current<-W()&&t.onResistanceAfter&&d.fireCallback(t.onResistanceAfter,d,Math.abs(d.positions.current+W())),t.resistance&&"100%"!==t.resistance)if(d.positions.current>0&&(r=1-d.positions.current/l/2,d.positions.current=r<.5?l/2:d.positions.current*r),d.positions.current<-W()){var s=(d.touches.current-d.touches.start)*t.touchRatio+(W()+d.positions.start);r=(l+s)/l;var a=d.positions.current-s*(1-r)/2,p=-W()-l/2;d.positions.current=a0&&(!t.freeMode||t.freeModeFluid)&&(d.positions.current=0),d.positions.current<-W()&&(!t.freeMode||t.freeModeFluid)&&(d.positions.current=-W())),!t.followFinger)return;if(t.moveStartThreshold)if(Math.abs(d.touches.current-d.touches.start)>t.moveStartThreshold||C){if(!C)return C=!0,void(d.touches.start=d.touches.current);d.setWrapperTranslate(d.positions.current)}else d.positions.current=d.positions.start;else d.setWrapperTranslate(d.positions.current);return(t.freeMode||t.watchActiveIndex)&&d.updateActiveSlide(d.positions.current),t.grabCursor&&(d.container.style.cursor="move",d.container.style.cursor="grabbing",d.container.style.cursor="-moz-grabbin",d.container.style.cursor="-webkit-grabbing"),b||(b=d.touches.current),x||(x=(new Date).getTime()),d.velocity=(d.touches.current-b)/((new Date).getTime()-x)/2,Math.abs(d.touches.current-b)<2&&(d.velocity=0),b=d.touches.current,x=(new Date).getTime(),d.callPlugins("onTouchMoveEnd"),t.onTouchMove&&d.fireCallback(t.onTouchMove,d,e),!1}}}}function V(e){if(o&&d.swipeReset(),!t.onlyExternal&&d.isTouched){d.isTouched=!1,t.grabCursor&&(d.container.style.cursor="move",d.container.style.cursor="grab",d.container.style.cursor="-moz-grab",d.container.style.cursor="-webkit-grab"),d.positions.current||0===d.positions.current||(d.positions.current=d.positions.start),t.followFinger&&d.setWrapperTranslate(d.positions.current),d.times.end=(new Date).getTime(),d.touches.diff=d.touches.current-d.touches.start,d.touches.abs=Math.abs(d.touches.diff),d.positions.diff=d.positions.current-d.positions.start,d.positions.abs=Math.abs(d.positions.diff);var i=d.positions.diff,n=d.positions.abs,s=d.times.end-d.times.start;n<5&&s<300&&!1===d.allowLinks&&(t.freeMode||0===n||d.swipeReset(),t.preventLinks&&(d.allowLinks=!0),t.onSlideClick&&(d.allowSlideClick=!0)),setTimeout(function(){null!=d&&(t.preventLinks&&(d.allowLinks=!0),t.onSlideClick&&(d.allowSlideClick=!0))},100);var p=W();if(!d.isMoved&&t.freeMode)return d.isMoved=!1,t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),void d.callPlugins("onTouchEnd");if(!d.isMoved||d.positions.current>0||d.positions.current<-p)return d.swipeReset(),t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),void d.callPlugins("onTouchEnd");if(d.isMoved=!1,t.freeMode){if(t.freeModeFluid){var c,u=1e3*t.momentumRatio,h=d.velocity*u,f=d.positions.current+h,g=!1,w=20*Math.abs(d.velocity)*t.momentumBounceRatio;f<-p&&(t.momentumBounce&&d.support.transitions?(f+p<-w&&(f=-p-w),c=-p,g=!0,M=!0):f=-p),f>0&&(t.momentumBounce&&d.support.transitions?(f>w&&(f=w),c=0,g=!0,M=!0):f=0),0!==d.velocity&&(u=Math.abs((f-d.positions.current)/d.velocity)),d.setWrapperTranslate(f),d.setWrapperTransition(u),t.momentumBounce&&g&&d.wrapperTransitionEnd(function(){M&&(t.onMomentumBounce&&d.fireCallback(t.onMomentumBounce,d),d.callPlugins("onMomentumBounce"),d.setWrapperTranslate(c),d.setWrapperTransition(300))}),d.updateActiveSlide(f)}return(!t.freeModeFluid||s>=300)&&d.updateActiveSlide(d.positions.current),t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),void d.callPlugins("onTouchEnd")}"toNext"===(a=i<0?"toNext":"toPrev")&&s<=300&&(n<30||!t.shortSwipes?d.swipeReset():d.swipeNext(!0,!0)),"toPrev"===a&&s<=300&&(n<30||!t.shortSwipes?d.swipeReset():d.swipePrev(!0,!0));var v=0;if("auto"===t.slidesPerView){for(var m,S=Math.abs(d.getWrapperTranslate()),y=0,T=0;TS){v=m;break}v>l&&(v=l)}else v=r*t.slidesPerView;"toNext"===a&&s>300&&(n>=v*t.longSwipesRatio?d.swipeNext(!0,!0):d.swipeReset()),"toPrev"===a&&s>300&&(n>=v*t.longSwipesRatio?d.swipePrev(!0,!0):d.swipeReset()),t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),d.callPlugins("onTouchEnd")}}function O(e,t){return e&&e.getAttribute("class")&&e.getAttribute("class").indexOf(t)>-1}function Y(e,t){var i,n=document.createElement("div");return n.innerHTML=t,(i=n.firstChild).className+=" "+e,i.outerHTML}function Z(e,i,n){var r="to"===i&&n.speed>=0?n.speed:t.speed,s=+new Date;if(d.support.transitions||!t.DOMAnimation)d.setWrapperTranslate(e),d.setWrapperTransition(r);else{var a=d.getWrapperTranslate(),o=Math.ceil((e-a)/r*(1e3/60)),l=a>e?"toNext":"toPrev";if(d._DOMAnimating)return;!function r(){var p=+new Date;a+=o*(p-s)/(1e3/60),("toNext"===l?a>e:a0||r<0)&&(r=e.offsetWidth-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left"))-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-right"))),t&&(r+=parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-right"))),i?Math.ceil(r):r},getHeight:function(e,t,i){"use strict";if(t)return e.offsetHeight;var n=window.getComputedStyle(e,null).getPropertyValue("height"),r=parseFloat(n);return(isNaN(r)||n.indexOf("%")>0||r<0)&&(r=e.offsetHeight-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-top"))-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-bottom"))),t&&(r+=parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-top"))+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-bottom"))),i?Math.ceil(r):r},getOffset:function(e){"use strict";var t=e.getBoundingClientRect(),i=document.body,n=e.clientTop||i.clientTop||0,r=e.clientLeft||i.clientLeft||0,s=window.pageYOffset||e.scrollTop,a=window.pageXOffset||e.scrollLeft;return document.documentElement&&!window.pageYOffset&&(s=document.documentElement.scrollTop,a=document.documentElement.scrollLeft),{top:t.top+s-n,left:t.left+a-r}},windowWidth:function(){"use strict";return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:void 0},windowHeight:function(){"use strict";return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:void 0},windowScroll:function(){"use strict";return"undefined"!=typeof pageYOffset?{left:window.pageXOffset,top:window.pageYOffset}:document.documentElement?{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}:void 0},addEventListener:function(e,t,i,n){"use strict";void 0===n&&(n=!1),e.addEventListener?e.addEventListener(t,i,n):e.attachEvent&&e.attachEvent("on"+t,i)},removeEventListener:function(e,t,i,n){"use strict";void 0===n&&(n=!1),e.removeEventListener?e.removeEventListener(t,i,n):e.detachEvent&&e.detachEvent("on"+t,i)}},setTransform:function(e,t){"use strict";var i=e.style;i.webkitTransform=i.MsTransform=i.msTransform=i.MozTransform=i.OTransform=i.transform=t},setTranslate:function(e,t){"use strict";var i=e.style,n=t.x||0,r=t.y||0,s=t.z||0,a=this.support.transforms3d?"translate3d("+n+"px,"+r+"px,"+s+"px)":"translate("+n+"px,"+r+"px)";i.webkitTransform=i.MsTransform=i.msTransform=i.MozTransform=i.OTransform=i.transform=a,this.support.transforms||(i.left=n+"px",i.top=r+"px")},setTransition:function(e,t){"use strict";var i=e.style;i.webkitTransitionDuration=i.MsTransitionDuration=i.msTransitionDuration=i.MozTransitionDuration=i.OTransitionDuration=i.transitionDuration=t+"ms"},support:{touch:window.Modernizr&&!0===Modernizr.touch||function(){"use strict";return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&!0===Modernizr.csstransforms3d||function(){"use strict";var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),transforms:window.Modernizr&&!0===Modernizr.csstransforms||function(){"use strict";var e=document.createElement("div").style;return"transform"in e||"WebkitTransform"in e||"MozTransform"in e||"msTransform"in e||"MsTransform"in e||"OTransform"in e}(),transitions:window.Modernizr&&!0===Modernizr.csstransitions||function(){"use strict";var e=document.createElement("div").style;return"transition"in e||"WebkitTransition"in e||"MozTransition"in e||"msTransition"in e||"MsTransition"in e||"OTransition"in e}(),classList:function(){"use strict";return"classList"in document.createElement("div")}()},browser:{ie8:function(){"use strict";var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var t=navigator.userAgent;null!==new RegExp(/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(t)&&(e=parseFloat(RegExp.$1))}return-1!==e&&e<9}(),ie10:window.navigator.msPointerEnabled,ie11:window.navigator.pointerEnabled}},(window.jQuery||window.Zepto)&&function(e){"use strict";e.fn.swiper=function(t){var i;return this.each(function(n){var r=e(this),s=new Swiper(r[0],t);n||(i=s),r.data("swiper",s)}),i}}(window.jQuery||window.Zepto),"undefined"!=typeof module?module.exports=Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return Swiper}),Swiper.prototype.plugins.progress=function(e){function t(){for(var t=0;tt.threshold&&i||l)&&(o.type="throttledresize",r.dispatch.apply(d,p),i=!1,a=0),a>9&&(e(s).stop(),n=!1,a=0)},30),n=!0)},threshold:0}}(jQuery),function(e){e.extend({canVideoautoplay:function(t){var i=!1;try{if(!(!navigator.userAgent.match(/(iPhone|iPod)/g)||"playsInline"in document.createElement("video")))return t(!1);var n=e('');e("body").prepend(n),i=!0,n[0].play(),n[0].onplay=function(){this.playing=!0},n[0].oncanplay=function(){n[0].playing?t(!0):t(!1),n[0].pause(),n.remove()}}catch(e){}i||t(!1)}})}(jQuery); !function(t,r){"use strict";var i=function(t,r,i){var n;return function(){function e(){i||(t.apply(u,s),n=null)}var u=this,s=arguments;n?clearTimeout(n):i&&t.apply(u,s),n=setTimeout(e,r||100)}};jQuery.fn[r]=function(t){return t?this.bind("resize",i(t)):this.trigger(r)}}(jQuery,"smartresize"); $=jQuery; $('p').each(function (){ var $this=$(this); if($this.html().replace(/\s| /g, '').length===0) $this.remove(); }); ;(function (factory){ var registeredInModuleLoader; if(typeof define==='function'&&define.amd){ define(factory); registeredInModuleLoader=true; } if(typeof exports==='object'){ module.exports=factory(); registeredInModuleLoader=true; } if(!registeredInModuleLoader){ var OldCookies=window.Cookies; var api=window.Cookies=factory(); api.noConflict=function (){ window.Cookies=OldCookies; return api; };}}(function (){ function extend (){ var i=0; var result={}; for (; i < arguments.length; i++){ var attributes=arguments[ i ]; for (var key in attributes){ result[key]=attributes[key]; }} return result; } function decode (s){ return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); } function init (converter){ function api(){} function set (key, value, attributes){ if(typeof document==='undefined'){ return; } attributes=extend({ path: '/' }, api.defaults, attributes); if(typeof attributes.expires==='number'){ attributes.expires=new Date(new Date() * 1 + attributes.expires * 864e+5); } attributes.expires=attributes.expires ? attributes.expires.toUTCString():''; try { var result=JSON.stringify(value); if(/^[\{\[]/.test(result)){ value=result; }} catch (e){} value=converter.write ? converter.write(value, key) : encodeURIComponent(String(value)) .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); key=encodeURIComponent(String(key)) .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) .replace(/[\(\)]/g, escape); var stringifiedAttributes=''; for (var attributeName in attributes){ if(!attributes[attributeName]){ continue; } stringifiedAttributes +='; ' + attributeName; if(attributes[attributeName]===true){ continue; } stringifiedAttributes +='=' + attributes[attributeName].split(';')[0]; } return (document.cookie=key + '=' + value + stringifiedAttributes); } function get (key, json){ if(typeof document==='undefined'){ return; } var jar={}; var cookies=document.cookie ? document.cookie.split('; '):[]; var i=0; for (; i < cookies.length; i++){ var parts=cookies[i].split('='); var cookie=parts.slice(1).join('='); if(!json&&cookie.charAt(0)==='"'){ cookie=cookie.slice(1, -1); } try { var name=decode(parts[0]); cookie=(converter.read||converter)(cookie, name) || decode(cookie); if(json){ try { cookie=JSON.parse(cookie); } catch (e){}} jar[name]=cookie; if(key===name){ break; }} catch (e){}} return key ? jar[key]:jar; } api.set=set; api.get=function (key){ return get(key, false ); }; api.getJSON=function (key){ return get(key, true ); }; api.remove=function (key, attributes){ set(key, '', extend(attributes, { expires: -1 })); }; api.defaults={}; api.withConverter=init; return api; } return init(function (){}); })); if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(t){"use strict";function e(e,o){return this.each(function(){var n=t(this),s=n.data("bs.modal"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);s||n.data("bs.modal",s=new i(this,r)),"string"==typeof e?s[e](o):r.show&&s.show(o)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.6",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var o=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),n&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});n?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(i.TRANSITION_DURATION):o.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var o=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&n;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var r=n[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),r=this.getUID(this.type);this.setContent(),s.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(a);h&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var d=this.getPosition(),p=s[0].offsetWidth,c=s[0].offsetHeight;if(h){var u=a,f=this.getPosition(this.$viewport);a="bottom"==a&&d.bottom+c>f.bottom?"top":"top"==a&&d.top-cf.width?"left":"left"==a&&d.left-pr.top+r.height&&(n.top=r.top+r.height-l)}else{var h=e.left-s,d=e.left+s+i;hr.right&&(n.left=r.left+r.width-d)}return n},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),r=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(r),!r.isDefaultPrevented()&&!s.isDefaultPrevented()){var a=t(o);this.activate(e.closest("li"),i),this.activate(a,a.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var r=o.find("> .active"),a=n&&t.support.transition&&(r.length&&r.hasClass("fade")||!!o.find("> .fade").length);r.length&&a?r.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),r.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery); (function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var s=0,n=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,a=n.call(arguments,1),o=0,r=a.length;r>o;o++)for(i in a[o])s=a[o][i],a[o].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(a){var o="string"==typeof a,r=n.call(arguments,1),h=this;return o?this.each(function(){var i,n=e.data(this,s);return"instance"===a?(h=n,!1):n?e.isFunction(n[a])&&"_"!==a.charAt(0)?(i=n[a].apply(n,r),i!==n&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+a+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+a+"'")}):(r.length&&(a=e.widget.extend.apply(null,[a].concat(r))),this.each(function(){var t=e.data(this,s);t?(t.option(a||{}),t._init&&t._init()):e.data(this,s,new i(a,this))})),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget,e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()1)return this.each(function(){a(this).lightSlider(b)}),this;var d={},e=a.extend(!0,{},c,b),f={},g=this;d.$el=this,"fade"===e.mode&&(e.vertical=!1);var h=g.children(),i=a(window).width(),j=null,k=null,l=0,m=0,n=!1,o=0,p="",q=0,r=e.vertical===!0?"height":"width",s=e.vertical===!0?"margin-bottom":"margin-right",t=0,u=0,v=0,w=0,x=null,y="ontouchstart"in document.documentElement,z={};return z.chbreakpoint=function(){if(i=a(window).width(),e.responsive.length){var b;if(e.autoWidth===!1&&(b=e.item),ie.responsive[0].breakpoint)for(var g in f)f.hasOwnProperty(g)&&(e[g]=f[g]);e.autoWidth===!1&&t>0&&v>0&&b!==e.item&&(q=Math.round(t/((v+e.slideMargin)*e.slideMove)))}},z.calSW=function(){e.autoWidth===!1&&(v=(o-(e.item*e.slideMargin-e.slideMargin))/e.item)},z.calWidth=function(a){var b=a===!0?p.find(".lslide").length:h.length;if(e.autoWidth===!1)m=b*(v+e.slideMargin);else{m=0;for(var c=0;b>c;c++)m+=parseInt(h.eq(c).width())+e.slideMargin}return m},d={doCss:function(){var a=function(){for(var a=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],b=document.documentElement,c=0;c'+e.prevHtml+''+e.nextHtml+"
    "),e.autoWidth?z.calWidth(!1)
    '),p=g.parent(".lSSlideWrapper"),e.rtl===!0&&p.parent().addClass("lSrtl"),e.vertical?(p.parent().addClass("vertical"),o=e.verticalHeight,p.css("height",o+"px")):o=g.outerWidth(),h.addClass("lslide"),e.loop===!0&&"slide"===e.mode&&(z.calSW(),z.clone=function(){if(z.calWidth(!0)>o){for(var b=0,c=0,d=0;d=o+e.slideMargin));d++);var f=e.autoWidth===!0?c:e.item;if(fh.length-1-g.find(".clone.right").length;j--)q--,h.eq(j).remove();for(var k=g.find(".clone.right").length;f>k;k++)g.find(".lslide").eq(k).clone().removeClass("lslide").addClass("clone right").appendTo(g),q++;for(var l=g.find(".lslide").length-g.find(".clone.left").length;l>g.find(".lslide").length-f;l--)g.find(".lslide").eq(l-1).clone().removeClass("lslide").addClass("clone left").prependTo(g);h=g.children()}else h.hasClass("clone")&&(g.find(".clone").remove(),a.move(g,0))},z.clone()),z.sSW=function(){l=h.length,e.rtl===!0&&e.vertical===!1&&(s="margin-left"),e.autoWidth===!1&&h.css(r,v+"px"),h.css(s,e.slideMargin+"px"),m=z.calWidth(!1),g.css(r,m+"px"),e.loop===!0&&"slide"===e.mode&&n===!1&&(q=g.find(".clone.left").length)},z.calL=function(){h=g.children(),l=h.length},this.doCss()&&p.addClass("usingCss"),z.calL(),"slide"===e.mode?(z.calSW(),z.sSW(),e.loop===!0&&(t=a.slideValue(),this.move(g,t)),e.vertical===!1&&this.setHeight(g,!1)):(this.setHeight(g,!0),g.addClass("lSFade"),this.doCss()||(h.fadeOut(0),h.eq(q).fadeIn(0))),e.loop===!0&&"slide"===e.mode?h.eq(q).addClass("active"):h.first().addClass("active")},pager:function(){var a=this;if(z.createPager=function(){w=(o-(e.thumbItem*e.thumbMargin-e.thumbMargin))/e.thumbItem;var b=p.find(".lslide"),c=p.find(".lslide").length,d=0,f="",h=0;for(d=0;c>d;d++){"slide"===e.mode&&(e.autoWidth?h+=(parseInt(b.eq(d).width())+e.slideMargin)*e.slideMove:h=d*(v+e.slideMargin)*e.slideMove);var i=b.eq(d*e.slideMove).attr("data-thumb");if(f+=e.gallery===!0?'
  • ':'
  • '+(d+1)+"
  • ","slide"===e.mode&&h>=m-o-e.slideMargin){d+=1;var j=2;e.autoWidth&&(f+='
  • '+(d+1)+"
  • ",j=1),j>d?(f=null,p.parent().addClass("noPager")):p.parent().removeClass("noPager");break}}var k=p.parent();k.find(".lSPager").html(f),e.gallery===!0&&(e.vertical===!0&&k.find(".lSPager").css("width",e.vThumbWidth+"px"),u=d*(e.thumbMargin+w)+.5,k.find(".lSPager").css({property:u+"px","transition-duration":e.speed+"ms"}),e.vertical===!0&&p.parent().css("padding-right",e.vThumbWidth+e.galleryMargin+"px"),k.find(".lSPager").css(r,u+"px"));var l=k.find(".lSPager").find("li");l.first().addClass("active"),l.on("click",function(){return e.loop===!0&&"slide"===e.mode?q+=l.index(this)-k.find(".lSPager").find("li.active").index():q=l.index(this),g.mode(!1),e.gallery===!0&&a.slideThumb(),!1})},e.pager){var b="lSpg";e.gallery&&(b="lSGallery"),p.after('
      ');var c=e.vertical?"margin-left":"margin-top";p.parent().find(".lSPager").css(c,e.galleryMargin+"px"),z.createPager()}setTimeout(function(){z.init()},0)},setHeight:function(a,b){var c=null,d=this;c=e.loop?a.children(".lslide ").first():a.children().first();var f=function(){var d=c.outerHeight(),e=0,f=d;b&&(d=0,e=100*f/o),a.css({height:d+"px","padding-bottom":e+"%"})};f(),c.find("img").length?c.find("img")[0].complete?(f(),x||d.auto()):c.find("img").on("load",function(){setTimeout(function(){f(),x||d.auto()},100)}):x||d.auto()},active:function(a,b){this.doCss()&&"fade"===e.mode&&p.addClass("on");var c=0;if(q*e.slideMove=d&&(c=f)),e.loop===!0&&"slide"===e.mode&&(c=b===!0?q-g.find(".clone.left").length:q*e.slideMove,b===!0&&(d=a.length,f=d-1,c+1===d?c=f:c+1>d&&(c=0))),this.doCss()||"fade"!==e.mode||b!==!1||a.eq(c).fadeIn(e.speed),a.eq(c).addClass("active")}else a.removeClass("active"),a.eq(a.length-1).addClass("active"),this.doCss()||"fade"!==e.mode||b!==!1||(a.fadeOut(e.speed),a.eq(c).fadeIn(e.speed))},move:function(a,b){e.rtl===!0&&(b=-b),this.doCss()?a.css(e.vertical===!0?{transform:"translate3d(0px, "+-b+"px, 0px)","-webkit-transform":"translate3d(0px, "+-b+"px, 0px)"}:{transform:"translate3d("+-b+"px, 0px, 0px)","-webkit-transform":"translate3d("+-b+"px, 0px, 0px)"}):e.vertical===!0?a.css("position","relative").animate({top:-b+"px"},e.speed,e.easing):a.css("position","relative").animate({left:-b+"px"},e.speed,e.easing);var c=p.parent().find(".lSPager").find("li");this.active(c,!0)},fade:function(){this.active(h,!1);var a=p.parent().find(".lSPager").find("li");this.active(a,!0)},slide:function(){var a=this;z.calSlide=function(){m>o&&(t=a.slideValue(),a.active(h,!1),t>m-o-e.slideMargin?t=m-o-e.slideMargin:0>t&&(t=0),a.move(g,t),e.loop===!0&&"slide"===e.mode&&(q>=l-g.find(".clone.left").length/e.slideMove&&a.resetSlide(g.find(".clone.left").length),0===q&&a.resetSlide(p.find(".lslide").length)))},z.calSlide()},resetSlide:function(a){var b=this;p.find(".lSAction a").addClass("disabled"),setTimeout(function(){q=a,p.css("transition-duration","0ms"),t=b.slideValue(),b.active(h,!1),d.move(g,t),setTimeout(function(){p.css("transition-duration",e.speed+"ms"),p.find(".lSAction a").removeClass("disabled")},50)},e.speed+100)},slideValue:function(){var a=0;if(e.autoWidth===!1)a=q*(v+e.slideMargin)*e.slideMove;else{a=0;for(var b=0;q>b;b++)a+=parseInt(h.eq(b).width())+e.slideMargin}return a},slideThumb:function(){var a;switch(e.currentPagerPosition){case"left":a=0;break;case"middle":a=o/2-w/2;break;case"right":a=o-w}var b=q-g.find(".clone.left").length,c=p.parent().find(".lSPager");"slide"===e.mode&&e.loop===!0&&(b>=c.children().length?b=0:0>b&&(b=c.children().length));var d=b*(w+e.thumbMargin)-a;d+o>u&&(d=u-o-e.thumbMargin),0>d&&(d=0),this.move(c,d)},auto:function(){e.auto&&(clearInterval(x),x=setInterval(function(){g.goToNextSlide()},e.pause))},pauseOnHover:function(){var b=this;e.auto&&e.pauseOnHover&&(p.on("mouseenter",function(){a(this).addClass("ls-hover"),g.pause(),e.auto=!0}),p.on("mouseleave",function(){a(this).removeClass("ls-hover"),p.find(".lightSlider").hasClass("lsGrabbing")||b.auto()}))},touchMove:function(a,b){if(p.css("transition-duration","0ms"),"slide"===e.mode){var c=a-b,d=t-c;if(d>=m-o-e.slideMargin)if(e.freeMove===!1)d=m-o-e.slideMargin;else{var f=m-o-e.slideMargin;d=f+(d-f)/5}else 0>d&&(e.freeMove===!1?d=0:d/=5);this.move(g,d)}},touchEnd:function(a){if(p.css("transition-duration",e.speed+"ms"),"slide"===e.mode){var b=!1,c=!0;t-=a,t>m-o-e.slideMargin?(t=m-o-e.slideMargin,e.autoWidth===!1&&(b=!0)):0>t&&(t=0);var d=function(a){var c=0;if(b||a&&(c=1),e.autoWidth)for(var d=0,f=0;f=t));f++);else{var g=t/((v+e.slideMargin)*e.slideMove);q=parseInt(g)+c,t>=m-o-e.slideMargin&&g%1!==0&&q++}};a>=e.swipeThreshold?(d(!1),c=!1):a<=-e.swipeThreshold&&(d(!0),c=!1),g.mode(c),this.slideThumb()}else a>=e.swipeThreshold?g.goToPrevSlide():a<=-e.swipeThreshold&&g.goToNextSlide()},enableDrag:function(){var b=this;if(!y){var c=0,d=0,f=!1;p.find(".lightSlider").addClass("lsGrab"),p.on("mousedown",function(b){return o>m&&0!==m?!1:void("lSPrev"!==a(b.target).attr("class")&&"lSNext"!==a(b.target).attr("class")&&(c=e.vertical===!0?b.pageY:b.pageX,f=!0,b.preventDefault?b.preventDefault():b.returnValue=!1,p.scrollLeft+=1,p.scrollLeft-=1,p.find(".lightSlider").removeClass("lsGrab").addClass("lsGrabbing"),clearInterval(x)))}),a(window).on("mousemove",function(a){f&&(d=e.vertical===!0?a.pageY:a.pageX,b.touchMove(d,c))}),a(window).on("mouseup",function(g){if(f){p.find(".lightSlider").removeClass("lsGrabbing").addClass("lsGrab"),f=!1,d=e.vertical===!0?g.pageY:g.pageX;var h=d-c;Math.abs(h)>=e.swipeThreshold&&a(window).on("click.ls",function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopImmediatePropagation(),b.stopPropagation(),a(window).off("click.ls")}),b.touchEnd(h)}})}},enableTouch:function(){var a=this;if(y){var b={},c={};p.on("touchstart",function(a){c=a.originalEvent.targetTouches[0],b.pageX=a.originalEvent.targetTouches[0].pageX,b.pageY=a.originalEvent.targetTouches[0].pageY,clearInterval(x)}),p.on("touchmove",function(d){if(o>m&&0!==m)return!1;var f=d.originalEvent;c=f.targetTouches[0];var g=Math.abs(c.pageX-b.pageX),h=Math.abs(c.pageY-b.pageY);e.vertical===!0?(3*h>g&&d.preventDefault(),a.touchMove(c.pageY,b.pageY)):(3*g>h&&d.preventDefault(),a.touchMove(c.pageX,b.pageX))}),p.on("touchend",function(){if(o>m&&0!==m)return!1;var d;d=e.vertical===!0?c.pageY-b.pageY:c.pageX-b.pageX,a.touchEnd(d)})}},build:function(){var b=this;b.initialStyle(),this.doCss()&&(e.enableTouch===!0&&b.enableTouch(),e.enableDrag===!0&&b.enableDrag()),a(window).on("focus",function(){b.auto()}),a(window).on("blur",function(){clearInterval(x)}),b.pager(),b.pauseOnHover(),b.controls(),b.keyPress()}},d.build(),z.init=function(){z.chbreakpoint(),e.vertical===!0?(o=e.item>1?e.verticalHeight:h.outerHeight(),p.css("height",o+"px")):o=p.outerWidth(),e.loop===!0&&"slide"===e.mode&&z.clone(),z.calL(),"slide"===e.mode&&g.removeClass("lSSlide"),"slide"===e.mode&&(z.calSW(),z.sSW()),setTimeout(function(){"slide"===e.mode&&g.addClass("lSSlide")},1e3),e.pager&&z.createPager(),e.adaptiveHeight===!0&&e.vertical===!1&&g.css("height",h.eq(q).outerHeight(!0)),e.adaptiveHeight===!1&&("slide"===e.mode?e.vertical===!1?d.setHeight(g,!1):d.auto():d.setHeight(g,!0)),e.gallery===!0&&d.slideThumb(),"slide"===e.mode&&d.slide(),e.autoWidth===!1?h.length<=e.item?p.find(".lSAction").hide():p.find(".lSAction").show():z.calWidth(!1)0)e.onBeforePrevSlide.call(this,g,q),q--,g.mode(!1),e.gallery===!0&&d.slideThumb();else if(e.loop===!0){if(e.onBeforePrevSlide.call(this,g,q),"fade"===e.mode){var a=l-1;q=parseInt(a/e.slideMove)}g.mode(!1),e.gallery===!0&&d.slideThumb()}else e.slideEndAnimation===!0&&(g.addClass("leftEnd"),setTimeout(function(){g.removeClass("leftEnd")},400))},g.goToNextSlide=function(){var a=!0;if("slide"===e.mode){var b=d.slideValue();a=b=q?b+(q-c):q>=b+c?q-b-c:q-c}return a+1},g.getTotalSlideCount=function(){return p.find(".lslide").length},g.goToSlide=function(a){q=e.loop?a+g.find(".clone.left").length-1:a,g.mode(!1),e.gallery===!0&&d.slideThumb()},g.destroy=function(){g.lightSlider&&(g.goToPrevSlide=function(){},g.goToNextSlide=function(){},g.mode=function(){},g.play=function(){},g.pause=function(){},g.refresh=function(){},g.getCurrentSlideCount=function(){},g.getTotalSlideCount=function(){},g.goToSlide=function(){},g.lightSlider=null,z={init:function(){}},g.parent().parent().find(".lSAction, .lSPager").remove(),g.removeClass("lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right").removeAttr("style").unwrap().unwrap(),g.children().removeAttr("style"),h.removeClass("lslide active"),g.find(".clone").remove(),h=null,x=null,n=!1,q=0)},setTimeout(function(){e.onSliderLoad.call(this,g)},10),a(window).on("resize orientationchange",function(a){setTimeout(function(){a.preventDefault?a.preventDefault():a.returnValue=!1,z.init()},200)}),this}}(jQuery); (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t currentTallest){ currentTallest=$(this).height(); }}); if(!px&&Number.prototype.pxToEm){ currentTallest=currentTallest.pxToEm(); } if($.browser.msie&&$.browser.version===6.0){ (this).children().css({'height': currentTallest}); } $(this).children().css({'min-height': currentTallest}); }); return this; };})(jQuery); (function(e, t, n){ "use strict"; t.infinitescroll=function(n, r, i){ this.element=t(i); if(!this._create(n, r)){ this.failed=true }}; t.infinitescroll.defaults={ loading: { finished: n, loaderHTML: '', finishedMsg: "Congratulations, you've reached the end of the internet.", img: "data:image/gif;base64,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", msg: null, msgText: "Loading the next set of posts...", selector: null, speed: "fast", start: n }, state: { isDuringAjax: false, isInvalidPage: false, isDestroyed: false, isDone: false, isPaused: false, isBeyondMaxPage: false, currPage: 1 }, debug: false, behavior: n, binder: t(e), nextSelector: "div.navigation a:first", navSelector: "div.navigation", contentSelector: null, extraScrollPx: 150, itemSelector: "div.post", animate: false, pathParse: n, dataType: "html", appendCallback: true, bufferPx: 40, errorCallback: function(){}, infid: 0, pixelsFromNavToBottom: n, path: n, prefill: false, maxPage: n }; t.infinitescroll.prototype={ _binding: function(t){ var r=this, i=r.options; i.v="2.0b2.120520"; if(!!i.behavior&&this["_binding_" + i.behavior]!==n){ this["_binding_" + i.behavior].call(this); return } if(t!=="bind"&&t!=="unbind"){ this._debug("Binding value " + t + " not valid"); return false } if(t==="unbind"){ this.options.binder.unbind("smartscroll.infscr." + r.options.infid) }else{ this.options.binder[t]("smartscroll.infscr." + r.options.infid, function(){ r.scroll() }) } this._debug("Binding", t) }, _create: function(i, s){ var o=t.extend(true, {}, t.infinitescroll.defaults, i); this.options=o; var u=t(e); var a=this; if(!a._validate(i)){ return false } var f=t(o.nextSelector).attr("href"); if(!f){ this._debug("Navigation selector not found"); return false } o.path=o.path||this._determinepath(f); o.contentSelector=o.contentSelector||this.element; o.loading.selector=o.loading.selector||o.contentSelector; o.loading.msg=o.loading.msg||t('
      ' + o.loading.loaderHTML + '
      ' + o.loading.msgText + "
      "); (new Image).src=o.loading.img; if(o.pixelsFromNavToBottom===n){ o.pixelsFromNavToBottom=t(document).height() - t(o.navSelector).offset().top; this._debug("pixelsFromNavToBottom: " + o.pixelsFromNavToBottom) } var l=this; o.loading.start=o.loading.start||function(){ t(o.navSelector).hide(); o.loading.msg.appendTo(o.loading.selector).fadeIn(o.loading.speed, t.proxy(function(){ this.beginAjax(o) }, l)) }; o.loading.finished=o.loading.finished||function(){ if(!o.state.isBeyondMaxPage) o.loading.msg.fadeOut(o.loading.speed) }; o.callback=function(e, r, i){ if(!!o.behavior&&e["_callback_" + o.behavior]!==n){ e["_callback_" + o.behavior].call(t(o.contentSelector)[0], r, i) } if(s){ s.call(t(o.contentSelector)[0], r, o, i) } if(o.prefill){ u.bind("resize.infinite-scroll", e._prefill) }}; if(i.debug){ if(Function.prototype.bind&&(typeof console==="object"||typeof console==="function")&&typeof console.log==="object"){ ["log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"].forEach(function(e){ console[e]=this.call(console[e], console) }, Function.prototype.bind) }} this._setup(); if(o.prefill){ this._prefill() } return true }, _prefill: function(){ function s(){ return r.options.contentSelector.height() <=i.height() } var r=this; var i=t(e); this._prefill=function(){ if(s()){ r.scroll() } i.bind("resize.infinite-scroll", function(){ if(s()){ i.unbind("resize.infinite-scroll"); r.scroll() }}) }; this._prefill() }, _debug: function(){ if(true!==this.options.debug){ return } if(typeof console!=="undefined"&&typeof console.log==="function"){ if(Array.prototype.slice.call(arguments).length===1&&typeof Array.prototype.slice.call(arguments)[0]==="string"){ console.log(Array.prototype.slice.call(arguments).toString()) }else{ console.log(Array.prototype.slice.call(arguments)) }}else if(!Function.prototype.bind&&typeof console!=="undefined"&&typeof console.log==="object"){ Function.prototype.call.call(console.log, console, Array.prototype.slice.call(arguments)) }}, _determinepath: function(t){ var r=this.options; if(!!r.behavior&&this["_determinepath_" + r.behavior]!==n){ return this["_determinepath_" + r.behavior].call(this, t) } if(!!r.pathParse){ this._debug("pathParse manual"); return r.pathParse(t, this.options.state.currPage + 1) }else if(t.match(/^(.*?)\b2\b(.*?$)/)){ t=t.match(/^(.*?)\b2\b(.*?$)/).slice(1) }else if(t.match(/^(.*?)2(.*?$)/)){ if(t.match(/^(.*?page=)2(\/.*|$)/)){ t=t.match(/^(.*?page=)2(\/.*|$)/).slice(1); return t } t=t.match(/^(.*?)2(.*?$)/).slice(1) }else{ if(t.match(/^(.*?page=)1(\/.*|$)/)){ t=t.match(/^(.*?page=)1(\/.*|$)/).slice(1); return t }else{ this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com."); r.state.isInvalidPage=true }} this._debug("determinePath", t); return t }, _error: function(t){ var r=this.options; if(!!r.behavior&&this["_error_" + r.behavior]!==n){ this["_error_" + r.behavior].call(this, t); return } if(t!=="destroy"&&t!=="end"){ t="unknown" } this._debug("Error", t); if(t==="end"||r.state.isBeyondMaxPage){ this._showdonemsg() } r.state.isDone=true; r.state.currPage=1; r.state.isPaused=false; r.state.isBeyondMaxPage=false; this._binding("unbind") }, _loadcallback: function(i, s, o){ var u=this.options, a=this.options.callback, f=u.state.isDone ? "done":!u.appendCallback ? "no-append":"append", l; if(!!u.behavior&&this["_loadcallback_" + u.behavior]!==n){ this["_loadcallback_" + u.behavior].call(this, i, s); return } switch (f){ case "done": this._showdonemsg(); return false; case "no-append": if(u.dataType==="html"){ s="
      " + s + "
      "; s=t(s).find(u.itemSelector) } break; case "append": var c=i.children(); if(c.length===0){ return this._error("end") } l=document.createDocumentFragment(); while (i[0].firstChild){ l.appendChild(i[0].firstChild) } this._debug("contentSelector", t(u.contentSelector)[0]); t(u.contentSelector)[0].appendChild(l); s=c.get(); break } u.loading.finished.call(t(u.contentSelector)[0], u); if(u.animate){ var h=t(e).scrollTop() + t(u.loading.msg).height() + u.extraScrollPx + "px"; t("html,body").animate({ scrollTop: h }, 800, function(){ u.state.isDuringAjax=false }) } if(!u.animate){ u.state.isDuringAjax=false } a(this, s, o); if(u.prefill){ this._prefill() }}, _nearbottom: function(){ var i=this.options, s=0 + t(document).height() - i.binder.scrollTop() - t(e).height(); if(!!i.behavior&&this["_nearbottom_" + i.behavior]!==n){ return this["_nearbottom_" + i.behavior].call(this) } this._debug("math:", s, i.pixelsFromNavToBottom); return s - i.bufferPx < i.pixelsFromNavToBottom }, _pausing: function(t){ var r=this.options; if(!!r.behavior&&this["_pausing_" + r.behavior]!==n){ this["_pausing_" + r.behavior].call(this, t); return } if(t!=="pause"&&t!=="resume"&&t!==null){ this._debug("Invalid argument. Toggling pause value instead") } t=t&&(t==="pause"||t==="resume") ? t:"toggle"; switch (t){ case "pause": r.state.isPaused=true; break; case "resume": r.state.isPaused=false; break; case "toggle": r.state.isPaused = !r.state.isPaused; break } this._debug("Paused", r.state.isPaused); return false }, _setup: function(){ var t=this.options; if(!!t.behavior&&this["_setup_" + t.behavior]!==n){ this["_setup_" + t.behavior].call(this); return } this._binding("bind"); return false }, _showdonemsg: function(){ var r=this.options; if(!!r.behavior&&this["_showdonemsg_" + r.behavior]!==n){ this["_showdonemsg_" + r.behavior].call(this); return } r.loading.msg.find(".spinner").animate({ 'opacity': 0 }, 500).parent().find("div.text").addClass('all-loaded').html(r.loading.finishedMsg).animate({ opacity: 0.8 }, 2e3, function(){}); r.errorCallback.call(t(r.contentSelector)[0], "done") }, _validate: function(n){ for (var r in n){ if(r.indexOf&&r.indexOf("Selector") > -1&&t(n[r]).length===0){ this._debug("Your " + r + " found no elements."); return false }} return true }, bind: function(){ this._binding("bind") }, destroy: function(){ this.options.state.isDestroyed=true; this.options.loading.finished(); return this._error("destroy") }, pause: function(){ this._pausing("pause") }, resume: function(){ this._pausing("resume") }, beginAjax: function(r){ var i=this, s=r.path, o, u, a, f; r.state.currPage++; if(r.maxPage!=n&&r.state.currPage > r.maxPage){ r.state.isBeyondMaxPage=true; this.destroy(); return } o=t(r.contentSelector).is("table, tbody") ? t(""):t("
      "); u=typeof s==="function" ? s(r.state.currPage):s.join(r.state.currPage); i._debug("heading into ajax", u); a=r.dataType==="html"||r.dataType==="json" ? r.dataType:"html+callback"; if(r.appendCallback&&r.dataType==="html"){ a +="+callback" } switch (a){ case "html+callback": i._debug("Using HTML via .load() method"); o.load(u + " " + r.itemSelector, n, function(t){ i._loadcallback(o, t, u) }); break; case "html": i._debug("Using " + a.toUpperCase() + " via $.ajax() method"); t.ajax({ url: u, dataType: r.dataType, complete: function(t, n){ f=typeof t.isResolved!=="undefined" ? t.isResolved():n==="success"||n==="notmodified"; if(f){ i._loadcallback(o, t.responseText, u) }else{ i._error("end") }} }); break; case "json": i._debug("Using " + a.toUpperCase() + " via $.ajax() method"); t.ajax({ dataType: "json", type: "GET", url: u, success: function(e, t, s){ f=typeof s.isResolved!=="undefined" ? s.isResolved():t==="success"||t==="notmodified"; if(r.appendCallback){ if(r.template!==n){ var a=r.template(e); o.append(a); if(f){ i._loadcallback(o, a) }else{ i._error("end") }}else{ i._debug("template must be defined."); i._error("end") }}else{ if(f){ i._loadcallback(o, e, u) }else{ i._error("end") }} }, error: function(){ i._debug("JSON ajax request failed."); i._error("end") }}); break }}, retrieve: function(r){ r=r||null; var i=this, s=i.options; if(!!s.behavior&&this["retrieve_" + s.behavior]!==n){ this["retrieve_" + s.behavior].call(this, r); return } if(s.state.isDestroyed){ this._debug("Instance is destroyed"); return false } s.state.isDuringAjax=true; s.loading.start.call(t(s.contentSelector)[0], s) }, scroll: function(){ var t=this.options, r=t.state; if(!!t.behavior&&this["scroll_" + t.behavior]!==n){ this["scroll_" + t.behavior].call(this); return } if(r.isDuringAjax||r.isInvalidPage||r.isDone||r.isDestroyed||r.isPaused){ return } if(!this._nearbottom()){ return } this.retrieve() }, toggle: function(){ this._pausing() }, unbind: function(){ this._binding("unbind") }, update: function(n){ if(t.isPlainObject(n)){ this.options=t.extend(true, this.options, n) }} }; t.fn.infinitescroll=function(n, r){ var i=typeof n; switch (i){ case "string": var s=Array.prototype.slice.call(arguments, 1); this.each(function(){ var e=t.data(this, "infinitescroll"); if(!e){ return false } if(!t.isFunction(e[n])||n.charAt(0)==="_"){ return false } e[n].apply(e, s) }); break; case "object": this.each(function(){ var e=t.data(this, "infinitescroll"); if(e){ e.update(n) }else{ e=new t.infinitescroll(n, r, this); if(!e.failed){ t.data(this, "infinitescroll", e) }} }); break } return this }; var r=t.event, i; r.special.smartscroll={ setup: function(){ t(this).bind("scroll", r.special.smartscroll.handler) }, teardown: function(){ t(this).unbind("scroll", r.special.smartscroll.handler) }, handler: function(e, n){ var r=this, s=arguments; e.type="smartscroll"; if(i){ clearTimeout(i) } i=setTimeout(function(){ t(r).trigger("smartscroll", s) }, n==="execAsap" ? 0:100) }}; t.fn.smartscroll=function(e){ return e ? this.bind("smartscroll", e):this.trigger("smartscroll", ["execAsap"]) }})(window, jQuery); ///////////////////////////////////////////// (function($){ var defaults={ topSpacing: 0, bottomSpacing: 0, className: 'is-sticky', wrapperClassName: 'sticky-wrapper', center: false, getWidthFrom: '', responsiveWidth: false }, $window=$(window), $document=$(document), sticked=[], windowHeight=$window.height(), scroller=function(){ var scrollTop=$window.scrollTop(), documentHeight=$document.height(), dwh=documentHeight - windowHeight, extra=(scrollTop > dwh) ? dwh - scrollTop:0; for (var i=0; i < sticked.length; i++){ var s=sticked[i], elementTop=s.stickyWrapper.offset().top, etse=elementTop - s.topSpacing - extra; if(scrollTop <=etse){ if(s.currentTop!==null){ s.stickyElement .css('position', '') .css('top', ''); s.stickyElement.trigger('sticky-end', [s]).parent().removeClass(s.className); s.currentTop=null; }}else{ var newTop=documentHeight - s.stickyElement.outerHeight() - s.topSpacing - s.bottomSpacing - scrollTop - extra; if(newTop < 0){ newTop=newTop + s.topSpacing; }else{ newTop=s.topSpacing; } if(s.currentTop!=newTop){ s.stickyElement .css('position', 'fixed') .css('top', newTop); if(typeof s.getWidthFrom!=='undefined'){ s.stickyElement.css('width', $(s.getWidthFrom).width()); } s.stickyElement.trigger('sticky-start', [s]).parent().addClass(s.className); s.currentTop=newTop; }} }}, resizer=function(){ windowHeight=$window.height(); for (var i=0; i < sticked.length; i++){ var s=sticked[i]; if(typeof s.getWidthFrom!=='undefined'&&s.responsiveWidth===true){ s.stickyElement.css('width', $(s.getWidthFrom).width()); }} }, methods={ init: function(options){ var o=$.extend({}, defaults, options); return this.each(function(){ var stickyElement=$(this); var stickyId=stickyElement.attr('id'); var wrapperId=stickyId ? stickyId + '-' + defaults.wrapperClassName:defaults.wrapperClassName var wrapper=$('
      ') .attr('id', stickyId + '-sticky-wrapper') .addClass(o.wrapperClassName); stickyElement.wrapAll(wrapper); if(o.center){ stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); } if(stickyElement.css("float")=="right"){ stickyElement.css({"float":"none"}).parent().css({"float":"right"}); } var stickyWrapper=stickyElement.parent(); var stickyHeight=stickyElement.outerHeight(true); if(stickyHeight > 0){ stickyWrapper.css('height', stickyElement.outerHeight(true)); } sticked.push({ topSpacing: o.topSpacing, bottomSpacing: o.bottomSpacing, stickyElement: stickyElement, currentTop: null, stickyWrapper: stickyWrapper, className: o.className, getWidthFrom: o.getWidthFrom, responsiveWidth: o.responsiveWidth }); }); }, update: scroller, unstick: function(options){ return this.each(function(){ var unstickyElement=$(this); var removeIdx=-1; for (var i=0; i < sticked.length; i++){ if(sticked[i].stickyElement.get(0)==unstickyElement.get(0)){ removeIdx=i; }} if(removeIdx!=-1){ sticked.splice(removeIdx,1); unstickyElement.unwrap(); unstickyElement.removeAttr('style'); }}); }}; if(window.addEventListener){ window.addEventListener('scroll', scroller, false); window.addEventListener('resize', resizer, false); }else if(window.attachEvent){ window.attachEvent('onscroll', scroller); window.attachEvent('onresize', resizer); } $.fn.sticky=function(method){ if(methods[method]){ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); }else if(typeof method==='object'||!method){ return methods.init.apply(this, arguments); }else{ $.error('Method ' + method + ' does not exist on jQuery.sticky'); }}; $.fn.unstick=function(method){ if(methods[method]){ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); }else if(typeof method==='object'||!method){ return methods.unstick.apply(this, arguments); }else{ $.error('Method ' + method + ' does not exist on jQuery.sticky'); }}; $(function(){ setTimeout(scroller, 0); }); })(jQuery); !function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&¤tPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null===options.pinchThreshold||pinchDistance>=options.pinchThreshold}function validateSwipeTime(){var result;return result=!options.maxTimeThreshold||!(duration>=options.maxTimeThreshold)}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distanceoptions.longTapThreshold&&distance=0?LEFT:angle<=360&&angle>=315?LEFT:angle>=135&&angle<=225?RIGHT:angle>45&&angle<135?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.xbounds.top&&point.y-1;n.transition=i("transition");n.transitionDelay=i("transitionDelay");n.transform=i("transform");n.transformOrigin=i("transformOrigin");n.filter=i("Filter");n.transform3d=r();var a={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]==="undefined"){t.support[u]=n[u]}}e=null;t.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform==="WebkitTransform"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data("transform",r)}};t.cssHooks.transform={set:t.cssHooks["transit:transform"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<"1.8"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p("scale");p("scaleX");p("scaleY");p("translate");p("rotate");p("rotateX");p("rotateY");p("rotate3d");p("perspective");p("skewX");p("skewY");p("x",true);p("y",true);function f(t){if(typeof t==="string"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e==="string"?e.split(","):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(",")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=b(t,"deg")},rotateX:function(t){this.rotateX=b(t,"deg")},rotateY:function(t){this.rotateY=b(t,"deg")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+","+e},skewX:function(t){this.skewX=b(t,"deg")},skewY:function(t){this.skewY=b(t,"deg")},perspective:function(t){this.perspective=b(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=b(t,"px")}if(e!==null&&e!==undefined){this._translateY=b(e,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=b(t[3],"deg")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin")){continue}if(i[0]!=="_"){if(t&&i==="scale"){e.push(i+"3d("+this[i]+",1)")}else if(t&&i==="translate"){e.push(i+"3d("+this[i]+",0)")}else{e.push(i+"("+this[i]+")")}}}}return e.join(" ")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=""+y(n)+" "+i;if(parseInt(r,10)>0){a+=" "+y(r)}var o=[];t.each(s,function(t,e){o.push(e+" "+a)});return o.join(", ")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=t.extend(true,{},e);if(typeof i==="function"){s=i;i=undefined}if(typeof i==="object"){r=i.easing;u=i.delay||0;f=typeof i.queue==="undefined"?true:i.queue;s=i.complete;i=i.duration}if(typeof r==="function"){s=r;r=undefined}if(typeof l.easing!=="undefined"){r=l.easing;delete l.easing}if(typeof l.duration!=="undefined"){i=l.duration;delete l.duration}if(typeof l.complete!=="undefined"){s=l.complete;delete l.complete}if(typeof l.queue!=="undefined"){f=l.queue;delete l.queue}if(typeof l.delay!=="undefined"){u=l.delay;delete l.delay}if(typeof i==="undefined"){i=t.fx.speeds._default}if(typeof r==="undefined"){r=t.cssEase._default}i=y(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var b=h?parseInt(i,10)+parseInt(u,10):0;if(b===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(e){var i=false;var r=function(){if(i){a.unbind(o,r)}if(b>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s==="function"){s.apply(a)}if(typeof e==="function"){e()}};if(b>0&&o&&t.transit.useTransitionEnd){i=true;a.bind(o,r)}else{window.setTimeout(r,b)}a.each(function(){if(b>0){this.style[n.transition]=p}t(this).css(l)})};var z=function(t){this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css("transit:transform");return i.get(e)},set:function(n,i){var r=t(n).css("transit:transform");r.setFromString(e,i);t(n).css({"transit:transform":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function b(t,e){if(typeof t==="string"&&!t.match(/^[\-0-9\.]+$/)){return t}else{return""+t+e}}function y(e){var n=e;if(typeof n==="string"&&!n.match(/^[\-0-9\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return b(n,"ms")}t.transit.getTransitionValue=d;return t}); (function($){ $.fn.appear=function(fn, options){ var settings=$.extend({ data: undefined, one: true, accX: 0, accY: 0 }, options); return this.each(function(){ var t=$(this); t.appeared=false; if(!fn){ t.trigger('appear', settings.data); return; } var w=$(window); var check=function(){ if(!t.is(':visible')){ t.appeared=false; return; } var a=w.scrollLeft(); var b=w.scrollTop(); var o=t.offset(); var x=o.left; var y=o.top; var ax=settings.accX; var ay=settings.accY; var th=t.height(); var wh=w.height(); var tw=t.width(); var ww=w.width(); if(y + th + ay >=b && y <=b + wh + ay && x + tw + ax >=a && x <=a + ww + ax){ if(!t.appeared) t.trigger('appear', settings.data); }else{ t.appeared=false; }}; var modifiedFn=function(){ t.appeared=true; if(settings.one){ w.unbind('scroll', check); var i=$.inArray(check, $.fn.appear.checks); if(i >=0) $.fn.appear.checks.splice(i, 1); } fn.apply(this, arguments); }; if(settings.one) t.one('appear', settings.data, modifiedFn); else t.bind('appear', settings.data, modifiedFn); w.scroll(check); $.fn.appear.checks.push(check); (check)(); }); }; $.extend($.fn.appear, { checks: [], timeout: null, checkAll: function(){ var length=$.fn.appear.checks.length; if(length > 0) while (length--) ($.fn.appear.checks[length])(); }, run: function(){ if($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); $.fn.appear.timeout=setTimeout($.fn.appear.checkAll, 20); }}); $.each(['append', 'prepend', 'after', 'before', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'remove', 'css', 'show', 'hide'], function(i, n){ var old=$.fn[n]; if(old){ $.fn[n]=function(){ var r=old.apply(this, arguments); $.fn.appear.run(); return r; }} }); })(jQuery); !function(t){var n="oninput"in document.createElement("input")?"input":"keydown";t.fn.autoGrowInput=function(o){var e=t.extend({maxWidth:500,minWidth:20,comfortZone:0},o);return this.each(function(){var i=t(this),a=" ",r=o&&"comfortZone"in o?e.comfortZone:parseInt(i.css("fontSize")),c=t("").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:i.css("fontSize"),fontFamily:i.css("fontFamily"),fontWeight:i.css("fontWeight"),letterSpacing:i.css("letterSpacing"),textTransform:i.css("textTransform"),whiteSpace:"nowrap",ariaHidden:!0}).appendTo("body"),s=function(t){if(a!==(a=i.val())||"autogrow"===t.type){a||(a=i.attr("placeholder")||""),c.html(a.replace(/&/g,"&").replace(/\s/g," ").replace(//g,">"));var n=c.width()+r,o="function"==typeof e.maxWidth?e.maxWidth():e.maxWidth;n>o?n=o:nn;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); (function($, window, undefined){ var extensions={ flash: ['swf'], image: ['bmp', 'gif', 'jpeg', 'jpg', 'png', 'tiff', 'tif', 'jfif', 'jpe'], iframe: ['asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'jsp', 'php', 'pl', 'php3', 'php4', 'php5', 'phtml', 'rb', 'rhtml', 'shtml', 'txt'], video: ['avi', 'mov', 'mpg', 'mpeg', 'movie', 'mp4', 'webm', 'ogv', 'ogg', '3gp', 'm4v'] }, $win=$(window), $doc=$(document), browser, transform, gpuAcceleration, fullScreenApi='', userAgent=navigator.userAgent||navigator.vendor||window.opera, supportTouch = !!('ontouchstart' in window)&&(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)), isMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(userAgent.substr(0, 4)), clickEvent=supportTouch ? "itap.iLightBox":"click.iLightBox", touchStartEvent=supportTouch ? "touchstart.iLightBox":"mousedown.iLightBox", touchStopEvent=supportTouch ? "touchend.iLightBox":"mouseup.iLightBox", touchMoveEvent=supportTouch ? "touchmove.iLightBox":"mousemove.iLightBox", abs=Math.abs, sqrt=Math.sqrt, round=Math.round, max=Math.max, min=Math.min, floor=Math.floor, random=Math.random, pluginspages={ quicktime: 'http://www.apple.com/quicktime/download', flash: 'http://www.adobe.com/go/getflash' }, iLightBox=function(el, options, items, instant){ var iL=this; iL.options=options, iL.selector=el.selector||el, iL.context=el.context, iL.instant=instant; if(items.length < 1) iL.attachItems(); else iL.items=items; iL.vars={ total: iL.items.length, start: 0, current: null, next: null, prev: null, BODY: $('body'), loadRequests: 0, overlay: $('
      '), loader: $('
      '), toolbar: $('
      '), innerToolbar: $('
      '), title: $('
      '), closeButton: $(''), fullScreenButton: $(''), innerPlayButton: $(''), innerNextButton: $(''), innerPrevButton: $(''), holder: $('
      '), nextPhoto: $('
      '), prevPhoto: $('
      '), nextButton: $(''), prevButton: $(''), thumbnails: $('
      '), thumbs: false, nextLock: false, prevLock: false, hashLock: false, isMobile: false, mobileMaxWidth: 980, isInFullScreen: false, isSwipe: false, mouseID: 0, cycleID: 0, isPaused: 0 }; iL.vars.hideableElements=iL.vars.nextButton.add(iL.vars.prevButton); iL.normalizeItems(); iL.availPlugins(); iL.options.startFrom=(iL.options.startFrom > 0&&iL.options.startFrom >=iL.vars.total) ? iL.vars.total - 1:iL.options.startFrom; iL.options.startFrom=(iL.options.randomStart) ? floor(random() * iL.vars.total):iL.options.startFrom; iL.vars.start=iL.options.startFrom; if(instant) iL.instantCall(); else iL.patchItemsEvents(); if(iL.options.linkId){ iL.hashChangeHandler(); $win.iLightBoxHashChange(function(){ iL.hashChangeHandler(); }); } if(supportTouch){ var RegExp=/(click|mouseenter|mouseleave|mouseover|mouseout)/ig, replace="itap"; iL.options.caption.show=iL.options.caption.show.replace(RegExp, replace), iL.options.caption.hide=iL.options.caption.hide.replace(RegExp, replace), iL.options.social.show=iL.options.social.show.replace(RegExp, replace), iL.options.social.hide=iL.options.social.hide.replace(RegExp, replace); } if(iL.options.controls.arrows){ $.extend(iL.options.styles, { nextOffsetX: 0, prevOffsetX: 0, nextOpacity: 0, prevOpacity: 0 }); }}; iLightBox.prototype={ showLoader: function(){ var iL=this; iL.vars.loadRequests +=1; if(iL.options.path.toLowerCase()=="horizontal") iL.vars.loader.addClass('ilightbox-show').stop().animate({ top: '-30px' }, iL.options.show.speed, 'easeOutCirc'); else iL.vars.loader.addClass('ilightbox-show').stop().animate({ left: '-30px' }, iL.options.show.speed, 'easeOutCirc'); }, hideLoader: function(){ var iL=this; iL.vars.loadRequests -=1; iL.vars.loadRequests=(iL.vars.loadRequests < 0) ? 0:iL.vars.loadRequests; if(iL.options.path.toLowerCase()=="horizontal"){ if(iL.vars.loadRequests <=0) iL.vars.loader.removeClass('ilightbox-show').stop().animate({ top: '-192px' }, iL.options.show.speed, 'easeInCirc'); }else{ if(iL.vars.loadRequests <=0) iL.vars.loader.removeClass('ilightbox-show').stop().animate({ left: '-192px' }, iL.options.show.speed, 'easeInCirc'); }}, createUI: function(){ var iL=this; iL.ui={ currentElement: iL.vars.holder, nextElement: iL.vars.nextPhoto, prevElement: iL.vars.prevPhoto, currentItem: iL.vars.current, nextItem: iL.vars.next, prevItem: iL.vars.prev, hide: function(){ iL.closeAction(); }, refresh: function(){ (arguments.length > 0) ? iL.repositionPhoto(true): iL.repositionPhoto(); }, fullscreen: function(){ iL.fullScreenAction(); }};}, attachItems: function(){ var iL=this, itemsObject=new Array(), items=new Array(); $(iL.selector, iL.context).each(function(){ var t=$(this), URL=t.attr(iL.options.attr)||null, options=t.data("options")&&eval("({" + t.data("options") + "})")||{}, caption=t.data('caption'), title=t.data('title'), type=t.data('type')||getTypeByExtension(URL); items.push({ URL: URL, caption: caption, title: title, type: type, options: options }); if(!iL.instant) itemsObject.push(t); }); iL.items=items, iL.itemsObject=itemsObject; }, normalizeItems: function(){ var iL=this, newItems=new Array(); $.each(iL.items, function(key, val){ if(typeof val=="string") val={ url: val }; var URL=val.url||val.URL||null, options=val.options||{}, caption=val.caption||null, title=val.title||null, type=(val.type) ? val.type.toLowerCase():getTypeByExtension(URL), ext=(typeof URL!='object') ? getExtension(URL):''; options.thumbnail=options.thumbnail||((type=="image") ? URL:null), options.videoType=options.videoType||null, options.skin=options.skin||iL.options.skin, options.width=options.width||null, options.height=options.height||null, options.mousewheel=(typeof options.mousewheel!='undefined') ? options.mousewheel:true, options.swipe=(typeof options.swipe!='undefined') ? options.swipe:true, options.social=(typeof options.social!='undefined') ? options.social:iL.options.social.buttons&&$.extend({}, {}, iL.options.social.buttons); if(type=="video"){ options.html5video=(typeof options.html5video!='undefined') ? options.html5video:{}; options.html5video.webm=options.html5video.webm||options.html5video.WEBM||null; options.html5video.controls=(typeof options.html5video.controls!='undefined') ? options.html5video.controls:"controls"; options.html5video.preload=options.html5video.preload||"metadata"; options.html5video.autoplay=(typeof options.html5video.autoplay!='undefined') ? options.html5video.autoplay:false; } if(!options.width||!options.height){ if(type=="video") options.width=1280, options.height=720; else if(type=="iframe") options.width='100%', options.height='90%'; else if(type=="flash") options.width=1280, options.height=720; } delete val.url; val.index=key; val.URL=URL; val.caption=caption; val.title=title; val.type=type; val.options=options; val.ext=ext; newItems.push(val); }); iL.items=newItems; }, instantCall: function(){ var iL=this, key=iL.vars.start; iL.vars.current=key; iL.vars.next=(iL.items[key + 1]) ? key + 1:null; iL.vars.prev=(iL.items[key - 1]) ? key - 1:null; iL.addContents(); iL.patchEvents(); }, addContents: function(){ var iL=this, vars=iL.vars, opts=iL.options, viewport=getViewport(), path=opts.path.toLowerCase(), recognizingItems=vars.total > 0&&iL.items.filter(function(e, i, arr){ return ['image', 'flash', 'video'].indexOf(e.type)===-1&&typeof e.recognized==='undefined'&&(opts.smartRecognition||e.options.smartRecognition); }), needRecognition=recognizingItems.length > 0; if(opts.mobileOptimizer&&!opts.innerToolbar) vars.isMobile=viewport.width <=vars.mobileMaxWidth; vars.overlay.addClass(opts.skin).hide().css('opacity', opts.overlay.opacity); if(opts.linkId) vars.overlay[0].setAttribute('linkid', opts.linkId); if(opts.controls.toolbar){ vars.toolbar.addClass(opts.skin).append(vars.closeButton); if(opts.controls.fullscreen) vars.toolbar.append(vars.fullScreenButton); if(opts.controls.slideshow) vars.toolbar.append(vars.innerPlayButton); if(vars.total > 1) vars.toolbar.append(vars.innerPrevButton).append(vars.innerNextButton); } vars.BODY.addClass('ilightbox-noscroll').append(vars.overlay).append(vars.loader).append(vars.holder).append(vars.nextPhoto).append(vars.prevPhoto); if(!opts.innerToolbar) vars.BODY.append(vars.toolbar); if(opts.controls.arrows) vars.BODY.append(vars.nextButton).append(vars.prevButton); if(opts.controls.thumbnail&&vars.total > 1){ vars.BODY.append(vars.thumbnails); vars.thumbnails.addClass(opts.skin).addClass('ilightbox-' + path); $('div.ilightbox-thumbnails-grid', vars.thumbnails).empty(); vars.thumbs=true; } var loaderCss=(opts.path.toLowerCase()=="horizontal") ? { left: parseInt((viewport.width / 2) - (vars.loader.outerWidth() / 2)) }:{ top: parseInt((viewport.height / 2) - (vars.loader.outerHeight() / 2)) }; vars.loader.addClass(opts.skin).css(loaderCss); vars.nextButton.add(vars.prevButton).addClass(opts.skin); if(path=="horizontal") vars.loader.add(vars.nextButton).add(vars.prevButton).addClass('horizontal'); vars.BODY[vars.isMobile ? 'addClass':'removeClass']('isMobile'); if(!opts.infinite){ vars.prevButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled'); if(vars.current==0) vars.prevButton.add(vars.innerPrevButton).addClass('disabled'); if(vars.current >=vars.total - 1) vars.nextButton.add(vars.innerNextButton).addClass('disabled'); } if(opts.show.effect){ vars.overlay.stop().fadeIn(opts.show.speed); vars.toolbar.stop().fadeIn(opts.show.speed); }else{ vars.overlay.show(); vars.toolbar.show(); } var length=recognizingItems.length; if(needRecognition){ iL.showLoader(); $.each(recognizingItems, function(key, val){ var resultFnc=function(result){ console.log(result); var key=-1, filter=iL.items.filter(function(e, i, arr){ if(e.URL==result.url) key=i; return e.URL==result.url; }), self=iL.items[key]; if(result) $.extend(true, self, { URL: result.source, type: result.type, recognized: true, options: { html5video: result.html5video, width: (result.type=="image") ? 0:(result.width||self.width), height: (result.type=="image") ? 0:(result.height||self.height), thumbnail: self.options.thumbnail||result.thumbnail }}); length--; if(length==0){ iL.hideLoader(); vars.dontGenerateThumbs=false; iL.generateThumbnails(); if(opts.show.effect) setTimeout(function(){ iL.generateBoxes(); }, opts.show.speed); else iL.generateBoxes(); }}; iL.ogpRecognition(this, resultFnc); }); }else{ if(opts.show.effect) setTimeout(function(){ iL.generateBoxes(); }, opts.show.speed); else iL.generateBoxes(); } iL.createUI(); window.iLightBox={ close: function(){ iL.closeAction(); }, fullscreen: function(){ iL.fullScreenAction(); }, moveNext: function(){ iL.moveTo('next'); }, movePrev: function(){ iL.moveTo('prev'); }, goTo: function(index){ iL.goTo(index); }, refresh: function(){ iL.refresh(); }, reposition: function(){ (arguments.length > 0) ? iL.repositionPhoto(true): iL.repositionPhoto(); }, setOption: function(options){ iL.setOption(options); }, destroy: function(){ iL.closeAction(); iL.dispatchItemsEvents(); }}; if(opts.linkId){ vars.hashLock=true; window.location.hash=opts.linkId + '/' + vars.current; setTimeout(function(){ vars.hashLock=false; }, 55); } if(!opts.slideshow.startPaused){ iL.resume(); vars.innerPlayButton.removeClass('ilightbox-play').addClass('ilightbox-pause'); } if(typeof iL.options.callback.onOpen=='function') iL.options.callback.onOpen.call(iL); }, loadContent: function(obj, opt, speed){ var iL=this, holder, item; iL.createUI(); obj.speed=speed||iL.options.effects.loadedFadeSpeed; if(opt=='current'){ if(!obj.options.mousewheel) iL.vars.lockWheel=true; else iL.vars.lockWheel=false; if(!obj.options.swipe) iL.vars.lockSwipe=true; else iL.vars.lockSwipe=false; } switch (opt){ case 'current': holder=iL.vars.holder, item=iL.vars.current; break; case 'next': holder=iL.vars.nextPhoto, item=iL.vars.next; break; case 'prev': holder=iL.vars.prevPhoto, item=iL.vars.prev; break; } holder.removeAttr('style class').addClass('ilightbox-holder' + (supportTouch ? ' supportTouch':'')).addClass(obj.options.skin); $('div.ilightbox-inner-toolbar', holder).remove(); if(obj.title||iL.options.innerToolbar){ var innerToolbar=iL.vars.innerToolbar.clone(); if(obj.title&&iL.options.show.title){ var title=iL.vars.title.clone(); title.empty().html(obj.title); innerToolbar.append(title); } if(iL.options.innerToolbar){ innerToolbar.append((iL.vars.total > 1) ? iL.vars.toolbar.clone():iL.vars.toolbar); } holder.prepend(innerToolbar); } console.warn('loadContent', arguments); iL.loadSwitcher(obj, holder, item, opt); }, loadSwitcher: function(obj, holder, item, opt){ var iL=this, opts=iL.options, api={ element: holder, position: item }; switch (obj.type){ case 'image': if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item); if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api); iL.loadImage(obj.URL, function(img){ if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item); if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api); var width=(img) ? img.width:400, height=(img) ? img.height:200; holder.data({ naturalWidth: width, naturalHeight: height }); $('div.ilightbox-container', holder).empty().append((img) ? '':'' + opts.errors.loadImage + ''); if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item); if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api); iL.configureHolder(obj, opt, holder); }); break; case 'video': holder.data({ naturalWidth: obj.options.width, naturalHeight: obj.options.height }); if(opt==='current'){ iL.addContent(holder, obj); if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item); if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api); }else{ $('div.ilightbox-container', holder).empty(); } iL.configureHolder(obj, opt, holder); break; case 'iframe': holder.data({ naturalWidth: obj.options.width, naturalHeight: obj.options.height }); iL.configureHolder(obj, opt, holder); if(opt==='current'){ var el=iL.addContent(holder, obj); if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item); if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api); if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item); if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api); el.bind('load', function(){ if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item); if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api); el.unbind('load'); }); }else{ $('div.ilightbox-container', holder).empty(); } break; case 'inline': var el=$(obj.URL), content=iL.addContent(holder, obj), images=findImageInElement(holder); holder.data({ naturalWidth: (iL.items[item].options.width||el.outerWidth()), naturalHeight: (iL.items[item].options.height||el.outerHeight()) }); content.children().eq(0).show(); if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item); if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api); if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item); if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api); iL.loadImage(images, function(){ if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item); if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api); iL.configureHolder(obj, opt, holder); }); break; case 'flash': var el=iL.addContent(holder, obj); holder.data({ naturalWidth: (iL.items[item].options.width||el.outerWidth()), naturalHeight: (iL.items[item].options.height||el.outerHeight()) }); if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item); if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api); iL.configureHolder(obj, opt, holder); break; case 'ajax': var ajax=obj.options.ajax||{}; if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item); if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api); iL.showLoader(); $.ajax({ url: obj.URL||opts.ajaxSetup.url, data: ajax.data||null, dataType: ajax.dataType||"html", type: ajax.type||opts.ajaxSetup.type, cache: ajax.cache||opts.ajaxSetup.cache, crossDomain: ajax.crossDomain||opts.ajaxSetup.crossDomain, global: ajax.global||opts.ajaxSetup.global, ifModified: ajax.ifModified||opts.ajaxSetup.ifModified, username: ajax.username||opts.ajaxSetup.username, password: ajax.password||opts.ajaxSetup.password, beforeSend: ajax.beforeSend||opts.ajaxSetup.beforeSend, complete: ajax.complete||opts.ajaxSetup.complete, success: function(data, textStatus, jqXHR){ iL.hideLoader(); var el=$(data), container=$('div.ilightbox-container', holder), elWidth=iL.items[item].options.width||parseInt(el[0].getAttribute('width')), elHeight=iL.items[item].options.height||parseInt(el[0].getAttribute('height')), css=(el[0].getAttribute('width')&&el[0].getAttribute('height')) ? { 'overflow': 'hidden' }:{}; container.empty().append($('
      ').css(css).html(el)); holder.show().data({ naturalWidth: (elWidth||container.outerWidth()), naturalHeight: (elHeight||container.outerHeight()) }).hide(); if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item); if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api); var images=findImageInElement(holder); iL.loadImage(images, function(){ if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item); if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api); iL.configureHolder(obj, opt, holder); }); opts.ajaxSetup.success(data, textStatus, jqXHR); if(typeof ajax.success=='function') ajax.success(data, textStatus, jqXHR); }, error: function(jqXHR, textStatus, errorThrown){ if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item); if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api); iL.hideLoader(); $('div.ilightbox-container', holder).empty().append('' + opts.errors.loadContents + ''); iL.configureHolder(obj, opt, holder); opts.ajaxSetup.error(jqXHR, textStatus, errorThrown); if(typeof ajax.error=='function') ajax.error(jqXHR, textStatus, errorThrown); }}); break; case 'html': var object=obj.URL, el container=$('div.ilightbox-container', holder); if(object[0].nodeName) el=object.clone(); else { var dom=$(object); if(dom.selector) el=$('
      ' + dom + '
      '); else el=dom; } var elWidth=iL.items[item].options.width||parseInt(el.attr('width')), elHeight=iL.items[item].options.height||parseInt(el.attr('height')); iL.addContent(holder, obj); el.appendTo(document.documentElement).hide(); if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item); if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api); var images=findImageInElement(holder); if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item); if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api); iL.loadImage(images, function(){ if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item); if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api); holder.show().data({ naturalWidth: (elWidth||container.outerWidth()), naturalHeight: (elHeight||container.outerHeight()) }).hide(); el.remove(); iL.configureHolder(obj, opt, holder); }); break; }}, configureHolder: function(obj, opt, holder){ var iL=this, vars=iL.vars, opts=iL.options; if(opt!="current")(opt=="next") ? holder.addClass('ilightbox-next'):holder.addClass('ilightbox-prev'); if(opt=="current") var item=vars.current; else if(opt=="next") var opacity=opts.styles.nextOpacity, item=vars.next; else var opacity=opts.styles.prevOpacity, item=vars.prev; var api={ element: holder, position: item }; iL.items[item].options.width=iL.items[item].options.width||0, iL.items[item].options.height=iL.items[item].options.height||0; if(opt=="current"){ if(opts.show.effect) holder.css(transform, gpuAcceleration).fadeIn(obj.speed, function(){ holder.css(transform, ''); if(obj.caption){ iL.setCaption(obj, holder); var caption=$('div.ilightbox-caption', holder), percent=parseInt((caption.outerHeight() / holder.outerHeight()) * 100); if(opts.caption.start & percent <=50) caption.fadeIn(opts.effects.fadeSpeed); } var social=obj.options.social; if(social){ iL.setSocial(social, obj.URL, holder); if(opts.social.start) $('div.ilightbox-social', holder).fadeIn(opts.effects.fadeSpeed); } iL.generateThumbnails(); if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item); if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api); }); else { holder.show(); iL.generateThumbnails(); if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item); if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api); }}else{ if(opts.show.effect) holder.fadeTo(obj.speed, opacity, function(){ if(opt=="next") vars.nextLock=false; else vars.prevLock=false; iL.generateThumbnails(); if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item); if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api); }); else { holder.css({ opacity: opacity }).show(); if(opt=="next") vars.nextLock=false; else vars.prevLock=false; iL.generateThumbnails(); if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item); if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api); }} setTimeout(function(){ iL.repositionPhoto(); }, 0); }, generateBoxes: function(){ var iL=this, vars=iL.vars, opts=iL.options; if(opts.infinite&&vars.total >=3){ if(vars.current==vars.total - 1) vars.next=0; if(vars.current==0) vars.prev=vars.total - 1; } else opts.infinite=false; iL.loadContent(iL.items[vars.current], 'current', opts.show.speed); if(iL.items[vars.next]) iL.loadContent(iL.items[vars.next], 'next', opts.show.speed); if(iL.items[vars.prev]) iL.loadContent(iL.items[vars.prev], 'prev', opts.show.speed); }, generateThumbnails: function(){ var iL=this, vars=iL.vars, opts=iL.options, timeOut=null; if(vars.thumbs&&!iL.vars.dontGenerateThumbs){ var thumbnails=vars.thumbnails, container=$('div.ilightbox-thumbnails-container', thumbnails), grid=$('div.ilightbox-thumbnails-grid', container), i=0; grid.removeAttr('style').empty(); $.each(iL.items, function(key, val){ var isActive=(vars.current==key) ? 'ilightbox-active':'', opacity=(vars.current==key) ? opts.thumbnails.activeOpacity:opts.thumbnails.normalOpacity, thumb=val.options.thumbnail, thumbnail=$('
      '), icon=$('
      '); thumbnail.css({ opacity: 0 }).addClass(isActive); if((val.type=="video"||val.type=="flash")&&typeof val.options.icon=='undefined'){ icon.addClass('ilightbox-thumbnail-video'); thumbnail.append(icon); }else if(val.options.icon){ icon.addClass('ilightbox-thumbnail-' + val.options.icon); thumbnail.append(icon); } if(thumb) iL.loadImage(thumb, function(img){ i++; if(img) thumbnail.data({ naturalWidth: img.width, naturalHeight: img.height }).append(''); else thumbnail.data({ naturalWidth: opts.thumbnails.maxWidth, naturalHeight: opts.thumbnails.maxHeight }); clearTimeout(timeOut); timeOut=setTimeout(function(){ iL.positionThumbnails(thumbnails, container, grid); }, 20); setTimeout(function(){ thumbnail.fadeTo(opts.effects.loadedFadeSpeed, opacity); }, i * 20); }); grid.append(thumbnail); }); iL.vars.dontGenerateThumbs=true; }}, positionThumbnails: function(thumbnails, container, grid){ var iL=this, vars=iL.vars, opts=iL.options, viewport=getViewport(), path=opts.path.toLowerCase(); if(!thumbnails) thumbnails=vars.thumbnails; if(!container) container=$('div.ilightbox-thumbnails-container', thumbnails); if(!grid) grid=$('div.ilightbox-thumbnails-grid', container); var thumbs=$('.ilightbox-thumbnail', grid), widthAvail=(path=='horizontal') ? viewport.width - opts.styles.pageOffsetX:thumbs.eq(0).outerWidth() - opts.styles.pageOffsetX, heightAvail=(path=='horizontal') ? thumbs.eq(0).outerHeight() - opts.styles.pageOffsetY:viewport.height - opts.styles.pageOffsetY, gridWidth=(path=='horizontal') ? 0:widthAvail, gridHeight=(path=='horizontal') ? heightAvail:0, active=$('.ilightbox-active', grid), gridCss={}, css={}; if(arguments.length < 3){ thumbs.css({ opacity: opts.thumbnails.normalOpacity }); active.css({ opacity: opts.thumbnails.activeOpacity }); } thumbs.each(function(i){ var t=$(this), data=t.data(), width=(path=='horizontal') ? 0:opts.thumbnails.maxWidth; height=(path=='horizontal') ? opts.thumbnails.maxHeight:0; dims=iL.getNewDimenstions(width, height, data.naturalWidth, data.naturalHeight, true); t.css({ width: dims.width, height: dims.height }); if(path=='horizontal') t.css({ 'float': 'left' }); (path=='horizontal') ? ( gridWidth +=t.outerWidth() ):( gridHeight +=t.outerHeight() ); }); gridCss={ width: gridWidth, height: gridHeight }; grid.css(gridCss); gridCss={}; var gridOffset=grid.offset(), activeOffset=(active.length) ? active.offset():{ top: parseInt(heightAvail / 2), left: parseInt(widthAvail / 2) }; gridOffset.top=(gridOffset.top - $doc.scrollTop()), gridOffset.left=(gridOffset.left - $doc.scrollLeft()), activeOffset.top=(activeOffset.top - gridOffset.top - $doc.scrollTop()), activeOffset.left=(activeOffset.left - gridOffset.left - $doc.scrollLeft()); (path=='horizontal') ? ( gridCss.top=0, gridCss.left=parseInt((widthAvail / 2) - activeOffset.left - (active.outerWidth() / 2)) ):( gridCss.top=parseInt(((heightAvail / 2) - activeOffset.top - (active.outerHeight() / 2))), gridCss.left=0 ); if(arguments.length < 3) grid.stop().animate(gridCss, opts.effects.repositionSpeed, 'easeOutCirc'); else grid.css(gridCss); }, loadImage: function(image, callback){ if(!$.isArray(image)) image=[image]; var iL=this, length=image.length; if(length > 0){ iL.showLoader(); $.each(image, function(index, value){ var img=new Image(); img.onload=function(){ length -=1; if(length==0){ iL.hideLoader(); callback(img); }}; img.onerror=img.onabort=function(){ length -=1; if(length==0){ iL.hideLoader(); callback(false); }}; img.src=image[index]; }); } else callback(false); }, patchItemsEvents: function(){ var iL=this, vars=iL.vars, clickEvent=supportTouch ? "itap.iL":"click.iL", vEvent=supportTouch ? "click.iL":"itap.iL"; if(iL.context&&iL.selector){ var $items=$(iL.selector, iL.context); $(iL.context).on(clickEvent, iL.selector, function(){ var $this=$(this), key=$items.index($this); if($('body').hasClass('mobile-browser')&&$('body').hasClass('mobile-two-click')){ if(!$this.hasClass('hovered')){ $this.addClass('hovered'); return false; }} vars.current=key; vars.next=iL.items[key + 1] ? key + 1:null; vars.prev=iL.items[key - 1] ? key - 1:null; iL.addContents(); iL.patchEvents(); return false; }).on(vEvent, iL.selector, function(){ return false; }); } else $.each(iL.itemsObject, function(key, val){ val.on(clickEvent, function(){ vars.current=key; vars.next=iL.items[key + 1] ? key + 1:null; vars.prev=iL.items[key - 1] ? key - 1:null; iL.addContents(); iL.patchEvents(); return false; }).on(vEvent, function(){ return false; }); }); }, dispatchItemsEvents: function(){ var iL=this, vars=iL.vars, opts=iL.options; if(iL.context&&iL.selector) $(iL.context).off('.iL', iL.selector); else $.each(iL.itemsObject, function(key, val){ val.off('.iL'); }); }, refresh: function(){ var iL=this; iL.dispatchItemsEvents(); iL.attachItems(); iL.normalizeItems(); iL.patchItemsEvents(); }, patchEvents: function(){ var iL=this, vars=iL.vars, opts=iL.options, path=opts.path.toLowerCase(), holders=$('.ilightbox-holder'), fullscreenEvent=fullScreenApi.fullScreenEventName + '.iLightBox', durationThreshold=1000, horizontalDistanceThreshold = verticalDistanceThreshold=100, buttonsArray=[vars.nextButton[0], vars.prevButton[0], vars.nextButton[0].firstChild, vars.prevButton[0].firstChild]; $win.bind('resize.iLightBox', function(){ var viewport=getViewport(); if(opts.mobileOptimizer&&!opts.innerToolbar) vars.isMobile=viewport.width <=vars.mobileMaxWidth; vars.BODY[vars.isMobile ? 'addClass':'removeClass']('isMobile'); iL.repositionPhoto(null); if(supportTouch){ clearTimeout(vars.setTime); vars.setTime=setTimeout(function(){ var scrollTop=getScrollXY().y; window.scrollTo(0, scrollTop - 30); window.scrollTo(0, scrollTop + 30); window.scrollTo(0, scrollTop); }, 2000); } if(vars.thumbs) iL.positionThumbnails(); }).bind('keydown.iLightBox', function(event){ if(opts.controls.keyboard){ switch (event.keyCode){ case 13: if(event.shiftKey&&opts.keyboard.shift_enter) iL.fullScreenAction(); break; case 27: if(opts.keyboard.esc) iL.closeAction(); break; case 37: if(opts.keyboard.left&&!vars.lockKey) iL.moveTo('prev'); break; case 38: if(opts.keyboard.up&&!vars.lockKey) iL.moveTo('prev'); break; case 39: if(opts.keyboard.right&&!vars.lockKey) iL.moveTo('next'); break; case 40: if(opts.keyboard.down&&!vars.lockKey) iL.moveTo('next'); break; }} }); if(fullScreenApi.supportsFullScreen) $win.bind(fullscreenEvent, function(){ iL.doFullscreen(); }); var holderEventsArr=[opts.caption.show + '.iLightBox', opts.caption.hide + '.iLightBox', opts.social.show + '.iLightBox', opts.social.hide + '.iLightBox'].filter(function(e, i, arr){ return arr.lastIndexOf(e)===i; }), holderEvents=""; $.each(holderEventsArr, function(key, val){ if(key!=0) holderEvents +=' '; holderEvents +=val; }); $doc.on(clickEvent, '.ilightbox-overlay', function(){ if(opts.overlay.blur) iL.closeAction(); }).on(clickEvent, '.ilightbox-next, .ilightbox-next-button', function(){ iL.moveTo('next'); }).on(clickEvent, '.ilightbox-prev, .ilightbox-prev-button', function(){ iL.moveTo('prev'); }).on(clickEvent, '.ilightbox-thumbnail', function(){ var t=$(this), thumbs=$('.ilightbox-thumbnail', vars.thumbnails), index=thumbs.index(t); if(index!=vars.current) iL.goTo(index); }).on(holderEvents, '.ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)', function(e){ var caption=$('div.ilightbox-caption', vars.holder), social=$('div.ilightbox-social', vars.holder), fadeSpeed=opts.effects.fadeSpeed; if(vars.nextLock||vars.prevLock){ if(e.type==opts.caption.show&&!caption.is(':visible')) caption.fadeIn(fadeSpeed); else if(e.type==opts.caption.hide&&caption.is(':visible')) caption.fadeOut(fadeSpeed); if(e.type==opts.social.show&&!social.is(':visible')) social.fadeIn(fadeSpeed); else if(e.type==opts.social.hide&&social.is(':visible')) social.fadeOut(fadeSpeed); }else{ if(e.type==opts.caption.show&&!caption.is(':visible')) caption.stop().fadeIn(fadeSpeed); else if(e.type==opts.caption.hide&&caption.is(':visible')) caption.stop().fadeOut(fadeSpeed); if(e.type==opts.social.show&&!social.is(':visible')) social.stop().fadeIn(fadeSpeed); else if(e.type==opts.social.hide&&social.is(':visible')) social.stop().fadeOut(fadeSpeed); }}).on('mouseenter.iLightBox mouseleave.iLightBox', '.ilightbox-wrapper', function(e){ if(e.type=='mouseenter') vars.lockWheel=true; else vars.lockWheel=false; }).on(clickEvent, '.ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause', function(){ var t=$(this); if(t.hasClass('ilightbox-fullscreen')) iL.fullScreenAction(); else if(t.hasClass('ilightbox-play')){ iL.resume(); t.addClass('ilightbox-pause').removeClass('ilightbox-play'); }else if(t.hasClass('ilightbox-pause')){ iL.pause(); t.addClass('ilightbox-play').removeClass('ilightbox-pause'); } else iL.closeAction(); }).on(touchMoveEvent, '.ilightbox-overlay, .ilightbox-thumbnails-container', function(e){ e.preventDefault(); }); function mouseMoveHandler(e){ if(!vars.isMobile){ if(!vars.mouseID){ vars.hideableElements.show(); } vars.mouseID=clearTimeout(vars.mouseID); if(buttonsArray.indexOf(e.target)===-1) vars.mouseID=setTimeout(function(){ vars.hideableElements.hide(); vars.mouseID=clearTimeout(vars.mouseID); }, 3000); }} if(opts.controls.arrows&&!supportTouch) $doc.on('mousemove.iLightBox', mouseMoveHandler); if(opts.controls.slideshow&&opts.slideshow.pauseOnHover) $doc.on('mouseenter.iLightBox mouseleave.iLightBox', '.ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)', function(e){ if(e.type=='mouseenter'&&vars.cycleID) iL.pause(); else if(e.type=='mouseleave'&&vars.isPaused) iL.resume(); }); var switchers=$('.ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails'); if(opts.controls.mousewheel) switchers.on('mousewheel.iLightBox', function(event, delta){ if(!vars.lockWheel){ event.preventDefault(); if(delta < 0) iL.moveTo('next'); else if(delta > 0) iL.moveTo('prev'); }}); if(opts.controls.swipe) holders.on(touchStartEvent, function(event){ if(vars.nextLock||vars.prevLock||vars.total==1||vars.lockSwipe) return; vars.BODY.addClass('ilightbox-closedhand'); var data=event.originalEvent.touches ? event.originalEvent.touches[0]:event, scrollTop=$doc.scrollTop(), scrollLeft=$doc.scrollLeft(), offsets=[ holders.eq(0).offset(), holders.eq(1).offset(), holders.eq(2).offset() ], offSet=[{ top: offsets[0].top - scrollTop, left: offsets[0].left - scrollLeft }, { top: offsets[1].top - scrollTop, left: offsets[1].left - scrollLeft }, { top: offsets[2].top - scrollTop, left: offsets[2].left - scrollLeft }], start={ time: (new Date()).getTime(), coords: [data.pageX - scrollLeft, data.pageY - scrollTop] }, stop; function moveEachHandler(i){ var t=$(this), offset=offSet[i], scroll=[(start.coords[0] - stop.coords[0]), (start.coords[1] - stop.coords[1])]; t[0].style[path=="horizontal" ? 'left':'top']=(path=="horizontal" ? offset.left - scroll[0]:offset.top - scroll[1]) + 'px'; } function moveHandler(event){ if(!start) return; var data=event.originalEvent.touches ? event.originalEvent.touches[0]:event; stop={ time: (new Date()).getTime(), coords: [data.pageX - scrollLeft, data.pageY - scrollTop] }; holders.each(moveEachHandler); event.preventDefault(); } function repositionHolders(){ holders.each(function(){ var t=$(this), offset=t.data('offset')||{ top: t.offset().top - scrollTop, left: t.offset().left - scrollLeft }, top=offset.top, left=offset.left; t.css(transform, gpuAcceleration).stop().animate({ top: top, left: left }, 500, 'easeOutCirc', function(){ t.css(transform, ''); }); }); } holders.bind(touchMoveEvent, moveHandler); $doc.one(touchStopEvent, function(event){ holders.unbind(touchMoveEvent, moveHandler); vars.BODY.removeClass('ilightbox-closedhand'); if(start&&stop){ if(path=="horizontal"&&stop.time - start.time < durationThreshold&&abs(start.coords[0] - stop.coords[0]) > horizontalDistanceThreshold&&abs(start.coords[1] - stop.coords[1]) < verticalDistanceThreshold){ if(start.coords[0] > stop.coords[0]){ if(vars.current==vars.total - 1&&!opts.infinite) repositionHolders(); else { vars.isSwipe=true; iL.moveTo('next'); }}else{ if(vars.current==0&&!opts.infinite) repositionHolders(); else { vars.isSwipe=true; iL.moveTo('prev'); }} }else if(path=="vertical"&&stop.time - start.time < durationThreshold&&abs(start.coords[1] - stop.coords[1]) > horizontalDistanceThreshold&&abs(start.coords[0] - stop.coords[0]) < verticalDistanceThreshold){ if(start.coords[1] > stop.coords[1]){ if(vars.current==vars.total - 1&&!opts.infinite) repositionHolders(); else { vars.isSwipe=true; iL.moveTo('next'); }}else{ if(vars.current==0&&!opts.infinite) repositionHolders(); else { vars.isSwipe=true; iL.moveTo('prev'); }} } else repositionHolders(); } start=stop=undefined; }); }); }, goTo: function(index){ var iL=this, vars=iL.vars, opts=iL.options, diff=(index - vars.current); if(opts.infinite){ if(index==vars.total - 1&&vars.current==0) diff=-1; if(vars.current==vars.total - 1&&index==0) diff=1; } if(diff==1) iL.moveTo('next'); else if(diff==-1) iL.moveTo('prev'); else { if(vars.nextLock||vars.prevLock) return false; if(typeof opts.callback.onBeforeChange=='function') opts.callback.onBeforeChange.call(iL, iL.ui); if(opts.linkId){ vars.hashLock=true; window.location.hash=opts.linkId + '/' + index; } if(iL.items[index]){ if(!iL.items[index].options.mousewheel) vars.lockWheel=true; else iL.vars.lockWheel=false; if(!iL.items[index].options.swipe) vars.lockSwipe=true; else vars.lockSwipe=false; } $.each([vars.holder, vars.nextPhoto, vars.prevPhoto], function(key, val){ val.css(transform, gpuAcceleration).fadeOut(opts.effects.loadedFadeSpeed); }); vars.current=index; vars.next=index + 1; vars.prev=index - 1; iL.createUI(); setTimeout(function(){ iL.generateBoxes(); }, opts.effects.loadedFadeSpeed + 50); $('.ilightbox-thumbnail', vars.thumbnails).removeClass('ilightbox-active').eq(index).addClass('ilightbox-active'); iL.positionThumbnails(); if(opts.linkId) setTimeout(function(){ vars.hashLock=false; }, 55); if(!opts.infinite){ vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled'); if(vars.current==0){ vars.prevButton.add(vars.innerPrevButton).addClass('disabled'); } if(vars.current >=vars.total - 1){ vars.nextButton.add(vars.innerNextButton).addClass('disabled'); }} iL.resetCycle(); if(typeof opts.callback.onAfterChange=='function') opts.callback.onAfterChange.call(iL, iL.ui); }}, moveTo: function(side){ var iL=this, vars=iL.vars, opts=iL.options, path=opts.path.toLowerCase(), viewport=getViewport(), switchSpeed=opts.effects.switchSpeed; if(vars.nextLock||vars.prevLock) return false; else { var item=(side=="next") ? vars.next:vars.prev; if(opts.linkId){ vars.hashLock=true; window.location.hash=opts.linkId + '/' + item; } if(side=="next"){ if(!iL.items[item]) return false; var firstHolder=vars.nextPhoto, secondHolder=vars.holder, lastHolder=vars.prevPhoto, firstClass='ilightbox-prev', secondClass='ilightbox-next'; }else if(side=="prev"){ if(!iL.items[item]) return false; var firstHolder=vars.prevPhoto, secondHolder=vars.holder, lastHolder=vars.nextPhoto, firstClass='ilightbox-next', secondClass='ilightbox-prev'; } if(typeof opts.callback.onBeforeChange=='function') opts.callback.onBeforeChange.call(iL, iL.ui); (side=="next") ? vars.nextLock=true: vars.prevLock=true; var captionFirst=$('div.ilightbox-caption', secondHolder), socialFirst=$('div.ilightbox-social', secondHolder); if(captionFirst.length) captionFirst.stop().fadeOut(switchSpeed, function(){ $(this).remove(); }); if(socialFirst.length) socialFirst.stop().fadeOut(switchSpeed, function(){ $(this).remove(); }); if(iL.items[item].caption){ iL.setCaption(iL.items[item], firstHolder); var caption=$('div.ilightbox-caption', firstHolder), percent=parseInt((caption.outerHeight() / firstHolder.outerHeight()) * 100); if(opts.caption.start&&percent <=50) caption.fadeIn(switchSpeed); } var social=iL.items[item].options.social; if(social){ iL.setSocial(social, iL.items[item].URL, firstHolder); if(opts.social.start) $('div.ilightbox-social', firstHolder).fadeIn(opts.effects.fadeSpeed); } $.each([firstHolder, secondHolder, lastHolder], function(key, val){ val.removeClass('ilightbox-next ilightbox-prev'); }); var firstOffset=firstHolder.data('offset'), winW=(viewport.width - (opts.styles.pageOffsetX)), winH=(viewport.height - (opts.styles.pageOffsetY)), width=firstOffset.newDims.width, height=firstOffset.newDims.height, thumbsOffset=firstOffset.thumbsOffset, diff=firstOffset.diff, top=parseInt((winH / 2) - (height / 2) - diff.H - (thumbsOffset.H / 2)), left=parseInt((winW / 2) - (width / 2) - diff.W - (thumbsOffset.W / 2)); firstHolder.css(transform, gpuAcceleration).animate({ top: top, left: left, opacity: 1 }, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc', function(){ firstHolder.css(transform, ''); }); $('div.ilightbox-container', firstHolder).animate({ width: width, height: height }, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc'); var secondOffset=secondHolder.data('offset'), object=secondOffset.object; diff=secondOffset.diff; width=secondOffset.newDims.width, height=secondOffset.newDims.height; width=parseInt(width * opts.styles[side=='next' ? 'prevScale':'nextScale']), height=parseInt(height * opts.styles[side=='next' ? 'prevScale':'nextScale']), top=(path=='horizontal') ? parseInt((winH / 2) - object.offsetY - (height / 2) - diff.H - (thumbsOffset.H / 2)):parseInt(winH - object.offsetX - diff.H - (thumbsOffset.H / 2)); if(side=='prev') left=(path=='horizontal') ? parseInt(winW - object.offsetX - diff.W - (thumbsOffset.W / 2)):parseInt((winW / 2) - (width / 2) - diff.W - object.offsetY - (thumbsOffset.W / 2)); else { top=(path=='horizontal') ? top:parseInt(object.offsetX - diff.H - height - (thumbsOffset.H / 2)), left=(path=='horizontal') ? parseInt(object.offsetX - diff.W - width - (thumbsOffset.W / 2)):parseInt((winW / 2) - object.offsetY - (width / 2) - diff.W - (thumbsOffset.W / 2)); } $('div.ilightbox-container', secondHolder).animate({ width: width, height: height }, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc'); secondHolder.addClass(firstClass).css(transform, gpuAcceleration).animate({ top: top, left: left, opacity: opts.styles.prevOpacity }, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc', function(){ secondHolder.css(transform, ''); $('.ilightbox-thumbnail', vars.thumbnails).removeClass('ilightbox-active').eq(item).addClass('ilightbox-active'); iL.positionThumbnails(); if(iL.items[item]){ if(!iL.items[item].options.mousewheel) vars.lockWheel=true; else vars.lockWheel=false; if(!iL.items[item].options.swipe) vars.lockSwipe=true; else vars.lockSwipe=false; } vars.isSwipe=false; if(['iframe', 'video'].indexOf(iL.items[vars.current].type)!==-1){ $('div.ilightbox-container', secondHolder).empty(); } if(side=="next"){ vars.nextPhoto=lastHolder, vars.prevPhoto=secondHolder, vars.holder=firstHolder; vars.nextPhoto.hide(); vars.next=vars.next + 1, vars.prev=vars.current, vars.current=vars.current + 1; if(opts.infinite){ if(vars.current > vars.total - 1) vars.current=0; if(vars.current==vars.total - 1) vars.next=0; if(vars.current==0) vars.prev=vars.total - 1; } iL.createUI(); if(!iL.items[vars.next]) vars.nextLock=false; else iL.loadContent(iL.items[vars.next], 'next'); }else{ vars.prevPhoto=lastHolder; vars.nextPhoto=secondHolder; vars.holder=firstHolder; vars.prevPhoto.hide(); vars.next=vars.current; vars.current=vars.prev; vars.prev=vars.current - 1; if(opts.infinite){ if(vars.current==vars.total - 1) vars.next=0; if(vars.current==0) vars.prev=vars.total - 1; } iL.createUI(); if(!iL.items[vars.prev]) vars.prevLock=false; else iL.loadContent(iL.items[vars.prev], 'prev'); } if(['iframe', 'video'].indexOf(iL.items[vars.current].type)!==-1){ iL.loadContent(iL.items[vars.current], 'current'); } if(opts.linkId) setTimeout(function(){ vars.hashLock=false; }, 55); if(!opts.infinite){ vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled'); if(vars.current==0) vars.prevButton.add(vars.innerPrevButton).addClass('disabled'); if(vars.current >=vars.total - 1) vars.nextButton.add(vars.innerNextButton).addClass('disabled'); } iL.repositionPhoto(); iL.resetCycle(); if(typeof opts.callback.onAfterChange=='function') opts.callback.onAfterChange.call(iL, iL.ui); }); top=(path=='horizontal') ? getPixel(lastHolder, 'top'):((side=="next") ? parseInt(-(winH / 2) - lastHolder.outerHeight()):parseInt(top * 2)), left=(path=='horizontal') ? ((side=="next") ? parseInt(-(winW / 2) - lastHolder.outerWidth()):parseInt(left * 2)):getPixel(lastHolder, 'left'); lastHolder.css(transform, gpuAcceleration).animate({ top: top, left: left, opacity: opts.styles.nextOpacity }, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc', function(){ lastHolder.css(transform, ''); }).addClass(secondClass); }}, setCaption: function(obj, target){ var iL=this, caption=$('
      '); if(obj.caption){ caption.html(obj.caption); $('div.ilightbox-container', target).append(caption); }}, normalizeSocial: function(obj, url){ var iL=this, vars=iL.vars, opts=iL.options, baseURL=window.location.href; $.each(obj, function(key, value){ if(!value) return true; var item=key.toLowerCase(), source, text; switch (item){ case 'facebook': source="http://www.facebook.com/share.php?v=4&src=bm&u={URL}", text="Share on Facebook"; break; case 'twitter': source="http://twitter.com/home?status={URL}", text="Share on Twitter"; break; case 'googleplus': source="https://plus.google.com/share?url={URL}", text="Share on Google+"; break; case 'delicious': source="http://delicious.com/post?url={URL}", text="Share on Delicious"; break; case 'digg': source="http://digg.com/submit?phase=2&url={URL}", text="Share on Digg"; break; case 'reddit': source="http://reddit.com/submit?url={URL}", text="Share on reddit"; break; } obj[key]={ URL: value.URL&&absolutizeURI(baseURL, value.URL)||opts.linkId&&window.location.href||typeof url!=='string'&&baseURL||url&&absolutizeURI(baseURL, url)||baseURL, source: value.source||source||value.URL&&absolutizeURI(baseURL, value.URL)||url&&absolutizeURI(baseURL, url), text: value.text||text||"Share on " + key, width: (typeof(value.width)!='undefined'&&!isNaN(value.width)) ? parseInt(value.width):640, height: value.height||360 };}); return obj; }, setSocial: function(obj, url, target){ var iL=this, socialBar=$('
      '), buttons='
        '; obj=iL.normalizeSocial(obj, url); $.each(obj, function(key, value){ var item=key.toLowerCase(), source=value.source.replace(/\{URL\}/g, encodeURIComponent(value.URL).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+')); buttons +='
      • '; }); buttons +='
      '; socialBar.html(buttons); $('div.ilightbox-container', target).append(socialBar); }, fullScreenAction: function(){ var iL=this, vars=iL.vars; if(fullScreenApi.supportsFullScreen){ if(fullScreenApi.isFullScreen()) fullScreenApi.cancelFullScreen(document.documentElement); else fullScreenApi.requestFullScreen(document.documentElement); }else{ iL.doFullscreen(); }}, doFullscreen: function(){ var iL=this, vars=iL.vars, viewport=getViewport(), opts=iL.options; if(opts.fullAlone){ var currentHolder=vars.holder, current=iL.items[vars.current], windowWidth=viewport.width, windowHeight=viewport.height, elements=[currentHolder, vars.nextPhoto, vars.prevPhoto, vars.nextButton, vars.prevButton, vars.overlay, vars.toolbar, vars.thumbnails, vars.loader], hideElements=[vars.nextPhoto, vars.prevPhoto, vars.nextButton, vars.prevButton, vars.loader, vars.thumbnails]; if(!vars.isInFullScreen){ vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=true; vars.overlay.css({ opacity: 1 }); $.each(hideElements, function(i, element){ element.hide(); }); vars.fullScreenButton.attr('title', opts.text.exitFullscreen); if(opts.fullStretchTypes.indexOf(current.type)!=-1) currentHolder.data({ naturalWidthOld: currentHolder.data('naturalWidth'), naturalHeightOld: currentHolder.data('naturalHeight'), naturalWidth: windowWidth, naturalHeight: windowHeight }); else { var viewport=current.options.fullViewPort||opts.fullViewPort||'', newWidth=windowWidth, newHeight=windowHeight, width=currentHolder.data('naturalWidth'), height=currentHolder.data('naturalHeight'); if(viewport.toLowerCase()=='fill'){ newHeight=(newWidth / width) * height; if(newHeight < windowHeight){ newWidth=(windowHeight / height) * width, newHeight=windowHeight; }}else if(viewport.toLowerCase()=='fit'){ var dims=iL.getNewDimenstions(newWidth, newHeight, width, height, true); newWidth=dims.width, newHeight=dims.height; }else if(viewport.toLowerCase()=='stretch'){ newWidth=newWidth, newHeight=newHeight; }else{ var scale=(width > newWidth||height > newHeight) ? true:false, dims=iL.getNewDimenstions(newWidth, newHeight, width, height, scale); newWidth=dims.width, newHeight=dims.height; } currentHolder.data({ naturalWidthOld: currentHolder.data('naturalWidth'), naturalHeightOld: currentHolder.data('naturalHeight'), naturalWidth: newWidth, naturalHeight: newHeight }); } $.each(elements, function(key, val){ val.addClass('ilightbox-fullscreen'); }); if(typeof opts.callback.onEnterFullScreen=='function') opts.callback.onEnterFullScreen.call(iL, iL.ui); }else{ vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=false; vars.overlay.css({ opacity: iL.options.overlay.opacity }); $.each(hideElements, function(i, element){ element.show(); }); vars.fullScreenButton.attr('title', opts.text.enterFullscreen); currentHolder.data({ naturalWidth: currentHolder.data('naturalWidthOld'), naturalHeight: currentHolder.data('naturalHeightOld'), naturalWidthOld: null, naturalHeightOld: null }); $.each(elements, function(key, val){ val.removeClass('ilightbox-fullscreen'); }); if(typeof opts.callback.onExitFullScreen=='function') opts.callback.onExitFullScreen.call(iL, iL.ui); }}else{ if(!vars.isInFullScreen) vars.isInFullScreen=true; else vars.isInFullScreen=false; } iL.repositionPhoto(true); }, closeAction: function(){ var iL=this, vars=iL.vars, opts=iL.options; $win.unbind('.iLightBox'); $doc.off('.iLightBox'); if(vars.isInFullScreen) fullScreenApi.cancelFullScreen(document.documentElement); $('.ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails').off('.iLightBox'); if(opts.hide.effect) vars.overlay.stop().fadeOut(opts.hide.speed, function(){ vars.overlay.remove(); vars.BODY.removeClass('ilightbox-noscroll').off('.iLightBox'); }); else { vars.overlay.remove(); vars.BODY.removeClass('ilightbox-noscroll').off('.iLightBox'); } var fadeOuts=[vars.toolbar, vars.holder, vars.nextPhoto, vars.prevPhoto, vars.nextButton, vars.prevButton, vars.loader, vars.thumbnails]; $.each(fadeOuts, function(i, element){ element.removeAttr('style').remove(); }); vars.dontGenerateThumbs=vars.isInFullScreen=false; window.iLightBox=null; if(opts.linkId){ vars.hashLock=true; removeHash(); setTimeout(function(){ vars.hashLock=false; }, 55); } if(typeof opts.callback.onHide=='function') opts.callback.onHide.call(iL, iL.ui); }, repositionPhoto: function(){ var iL=this, vars=iL.vars, opts=iL.options, path=opts.path.toLowerCase(), viewport=getViewport(), winWidth=viewport.width, winHeight=viewport.height; var thumbsOffsetW=(vars.isInFullScreen&&opts.fullAlone||vars.isMobile) ? 0:((path=='horizontal') ? 0:vars.thumbnails.outerWidth()), thumbsOffsetH=vars.isMobile ? vars.toolbar.outerHeight():((vars.isInFullScreen&&opts.fullAlone) ? 0:((path=='horizontal') ? vars.thumbnails.outerHeight():0)), width=(vars.isInFullScreen&&opts.fullAlone) ? winWidth:(winWidth - (opts.styles.pageOffsetX)), height=(vars.isInFullScreen&&opts.fullAlone) ? winHeight:(winHeight - (opts.styles.pageOffsetY)), offsetW=(path=='horizontal') ? parseInt((iL.items[vars.next]||iL.items[vars.prev]) ? ((opts.styles.nextOffsetX + opts.styles.prevOffsetX)) * 2:(((width / 10) <=30) ? 30:(width / 10))):parseInt(((width / 10) <=30) ? 30:(width / 10)) + thumbsOffsetW, offsetH=(path=='horizontal') ? parseInt(((height / 10) <=30) ? 30:(height / 10)) + thumbsOffsetH:parseInt((iL.items[vars.next]||iL.items[vars.prev]) ? ((opts.styles.nextOffsetX + opts.styles.prevOffsetX)) * 2:(((height / 10) <=30) ? 30:(height / 10))); var elObject={ type: 'current', width: width, height: height, item: iL.items[vars.current], offsetW: offsetW, offsetH: offsetH, thumbsOffsetW: thumbsOffsetW, thumbsOffsetH: thumbsOffsetH, animate: arguments.length, holder: vars.holder }; iL.repositionEl(elObject); if(iL.items[vars.next]){ elObject=$.extend(elObject, { type: 'next', item: iL.items[vars.next], offsetX: opts.styles.nextOffsetX, offsetY: opts.styles.nextOffsetY, holder: vars.nextPhoto }); iL.repositionEl(elObject); } if(iL.items[vars.prev]){ elObject=$.extend(elObject, { type: 'prev', item: iL.items[vars.prev], offsetX: opts.styles.prevOffsetX, offsetY: opts.styles.prevOffsetY, holder: vars.prevPhoto }); iL.repositionEl(elObject); } var loaderCss=(path=="horizontal") ? { left: parseInt((width / 2) - (vars.loader.outerWidth() / 2)) }:{ top: parseInt((height / 2) - (vars.loader.outerHeight() / 2)) }; vars.loader.css(loaderCss); }, repositionEl: function(obj){ var iL=this, vars=iL.vars, opts=iL.options, path=opts.path.toLowerCase(), widthAvail=(obj.type=='current') ? ((vars.isInFullScreen&&opts.fullAlone) ? obj.width:(obj.width - obj.offsetW)):(obj.width - obj.offsetW), heightAvail=(obj.type=='current') ? ((vars.isInFullScreen&&opts.fullAlone) ? obj.height:(obj.height - obj.offsetH)):(obj.height - obj.offsetH), itemParent=obj.item, item=obj.item.options, holder=obj.holder, offsetX=obj.offsetX||0, offsetY=obj.offsetY||0, thumbsOffsetW=obj.thumbsOffsetW, thumbsOffsetH=obj.thumbsOffsetH; if(obj.type=='current'){ if(typeof item.width=='number'&&item.width) widthAvail=((vars.isInFullScreen&&opts.fullAlone)&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort)) ? widthAvail:((item.width > widthAvail) ? widthAvail:item.width); if(typeof item.height=='number'&&item.height) heightAvail=((vars.isInFullScreen&&opts.fullAlone)&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort)) ? heightAvail:((item.height > heightAvail) ? heightAvail:item.height); }else{ if(typeof item.width=='number'&&item.width) widthAvail=(item.width > widthAvail) ? widthAvail:item.width; if(typeof item.height=='number'&&item.height) heightAvail=(item.height > heightAvail) ? heightAvail:item.height; } if(opts.innerToolbar) heightAvail=parseInt(heightAvail - $('.ilightbox-inner-toolbar', holder).outerHeight()); var width=(typeof item.width=='string'&&item.width.indexOf('%')!=-1) ? percentToValue(parseInt(item.width.replace('%', '')), obj.width):holder.data('naturalWidth'), height=(typeof item.height=='string'&&item.height.indexOf('%')!=-1) ? percentToValue(parseInt(item.height.replace('%', '')), obj.height):holder.data('naturalHeight'); var dims=((typeof item.width=='string'&&item.width.indexOf('%')!=-1||typeof item.height=='string'&&item.height.indexOf('%')!=-1) ? { width: width, height: height }:iL.getNewDimenstions(widthAvail, heightAvail, width, height)), newDims=$.extend({}, dims, {}); if(obj.type=='prev'||obj.type=='next') width=parseInt(dims.width * ((obj.type=='next') ? opts.styles.nextScale:opts.styles.prevScale)), height=parseInt(dims.height * ((obj.type=='next') ? opts.styles.nextScale:opts.styles.prevScale)); else width=dims.width, height=dims.height; var widthDiff=parseInt((getPixel(holder, 'padding-left') + getPixel(holder, 'padding-right') + getPixel(holder, 'border-left-width') + getPixel(holder, 'border-right-width')) / 2), heightDiff=parseInt((getPixel(holder, 'padding-top') + getPixel(holder, 'padding-bottom') + getPixel(holder, 'border-top-width') + getPixel(holder, 'border-bottom-width') + ($('.ilightbox-inner-toolbar', holder).outerHeight()||0)) / 2); switch (obj.type){ case 'current': var top=parseInt((obj.height / 2) - (height / 2) - heightDiff - (thumbsOffsetH / 2)), left=parseInt((obj.width / 2) - (width / 2) - widthDiff - (thumbsOffsetW / 2)); break; case 'next': var top=(path=='horizontal') ? parseInt((obj.height / 2) - offsetY - (height / 2) - heightDiff - (thumbsOffsetH / 2)):parseInt(obj.height - offsetX - heightDiff - (thumbsOffsetH / 2)), left=(path=='horizontal') ? parseInt(obj.width - offsetX - widthDiff - (thumbsOffsetW / 2)):parseInt((obj.width / 2) - (width / 2) - widthDiff - offsetY - (thumbsOffsetW / 2)); break; case 'prev': var top=(path=='horizontal') ? parseInt((obj.height / 2) - offsetY - (height / 2) - heightDiff - (thumbsOffsetH / 2)):parseInt(offsetX - heightDiff - height - (thumbsOffsetH / 2)), left=(path=='horizontal') ? parseInt(offsetX - widthDiff - width - (thumbsOffsetW / 2)):parseInt((obj.width / 2) - offsetY - (width / 2) - widthDiff - (thumbsOffsetW / 2)); break; } holder.data('offset', { top: top, left: left, newDims: newDims, diff: { W: widthDiff, H: heightDiff }, thumbsOffset: { W: thumbsOffsetW, H: thumbsOffsetH }, object: obj }); if(obj.animate > 0&&opts.effects.reposition){ holder.css(transform, gpuAcceleration).stop().animate({ top: top, left: left }, opts.effects.repositionSpeed, 'easeOutCirc', function(){ holder.css(transform, ''); }); $('div.ilightbox-container', holder).stop().animate({ width: width, height: height }, opts.effects.repositionSpeed, 'easeOutCirc'); $('div.ilightbox-inner-toolbar', holder).stop().animate({ width: width }, opts.effects.repositionSpeed, 'easeOutCirc', function(){ $(this).css('overflow', 'visible'); }); }else{ holder.css({ top: top, left: left }); $('div.ilightbox-container', holder).css({ width: width, height: height }); $('div.ilightbox-inner-toolbar', holder).css({ width: width }); }}, resume: function(priority){ var iL=this, vars=iL.vars, opts=iL.options; if(!opts.slideshow.pauseTime||opts.controls.slideshow&&vars.total <=1||priority < vars.isPaused){ return; } vars.isPaused=0; if(vars.cycleID){ vars.cycleID=clearTimeout(vars.cycleID); } vars.cycleID=setTimeout(function(){ if(vars.current==vars.total - 1) iL.goTo(0); else iL.moveTo('next'); }, opts.slideshow.pauseTime); }, pause: function(priority){ var iL=this, vars=iL.vars, opts=iL.options; if(priority < vars.isPaused){ return; } vars.isPaused=priority||100; if(vars.cycleID){ vars.cycleID=clearTimeout(vars.cycleID); }}, resetCycle: function(){ var iL=this, vars=iL.vars, opts=iL.options; if(opts.controls.slideshow&&vars.cycleID&&!vars.isPaused){ iL.resume(); }}, getNewDimenstions: function(width, height, width_old, height_old, thumb){ var iL=this; if(!width) factor=height / height_old; else if(!height) factor=width / width_old; else factor=min(width / width_old, height / height_old); if(!thumb){ if(factor > iL.options.maxScale) factor=iL.options.maxScale; else if(factor < iL.options.minScale) factor=iL.options.minScale; } var final_width=(iL.options.keepAspectRatio) ? round(width_old * factor):width, final_height=(iL.options.keepAspectRatio) ? round(height_old * factor):height; return { width: final_width, height: final_height, ratio: factor };}, setOption: function(options){ var iL=this; iL.options=$.extend(true, iL.options, options||{}); iL.refresh(); }, availPlugins: function(){ var iL=this, testEl=document.createElement("video"); iL.plugins={ flash: !isMobile, quicktime: (parseInt(PluginDetect.getVersion("QuickTime")) >=0) ? true:false, html5H264: !!(testEl.canPlayType&&testEl.canPlayType('video/mp4').replace(/no/, '')), html5WebM: !!(testEl.canPlayType&&testEl.canPlayType('video/webm').replace(/no/, '')), html5Vorbis: !!(testEl.canPlayType&&testEl.canPlayType('video/ogg').replace(/no/, '')), html5QuickTime: !!(testEl.canPlayType&&testEl.canPlayType('video/quicktime').replace(/no/, '')) };}, addContent: function(element, obj){ var iL=this, el; switch (obj.type){ case 'video': var HTML5=false, videoType=obj.videoType, html5video=obj.options.html5video; if(((videoType=='video/mp4'||obj.ext=='mp4'||obj.ext=='m4v')||html5video.h264)&&iL.plugins.html5H264) obj.ext='mp4', obj.URL=html5video.h264||obj.URL; else if(html5video.webm&&iL.plugins.html5WebM) obj.ext='webm', obj.URL=html5video.webm||obj.URL; else if(html5video.ogg&&iL.plugins.html5Vorbis) obj.ext='ogv', obj.URL=html5video.ogg||obj.URL; if(iL.plugins.html5H264&&(videoType=='video/mp4'||obj.ext=='mp4'||obj.ext=='m4v')) HTML5=true, videoType="video/mp4"; else if(iL.plugins.html5WebM&&(videoType=='video/webm'||obj.ext=='webm')) HTML5=true, videoType="video/webm"; else if(iL.plugins.html5Vorbis&&(videoType=='video/ogg'||obj.ext=='ogv')) HTML5=true, videoType="video/ogg"; else if(iL.plugins.html5QuickTime&&(videoType=='video/quicktime'||obj.ext=='mov'||obj.ext=='qt')) HTML5=true, videoType="video/quicktime"; if(HTML5){ el=$('